Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: shell/src/Main.cpp

Issue 10100009: FilterEngine API improvements (Closed)
Patch Set: Added filter access and addressed review comments Created April 5, 2013, 12:10 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: shell/src/Main.cpp
===================================================================
--- a/shell/src/Main.cpp
+++ b/shell/src/Main.cpp
@@ -1,15 +1,16 @@
#include <AdblockPlus.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include "GcCommand.h"
#include "HelpCommand.h"
+#include "FiltersCommand.h"
#include "SubscriptionsCommand.h"
#include "MatchesCommand.h"
namespace
{
class LibFileReader : public AdblockPlus::FileReader
{
public:
@@ -60,16 +61,17 @@ int main()
LibFileReader fileReader;
CerrErrorCallback errorCallback;
AdblockPlus::JsEngine jsEngine(&fileReader, 0);
AdblockPlus::FilterEngine filterEngine(jsEngine);
CommandMap commands;
Add(commands, new GcCommand(jsEngine));
Add(commands, new HelpCommand(commands));
+ Add(commands, new FiltersCommand(filterEngine));
Add(commands, new SubscriptionsCommand(filterEngine));
Add(commands, new MatchesCommand(filterEngine));
std::string commandLine;
while (ReadCommandLine(commandLine))
{
std::string commandName;
std::string arguments;

Powered by Google App Engine
This is Rietveld