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

Side by Side Diff: shell/src/Main.cpp

Issue 29508555: Issue 5450 - move FilterEngine into Platform (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Aug. 7, 2017, 8:28 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 AdblockPlus::AppInfo appInfo; 59 AdblockPlus::AppInfo appInfo;
60 appInfo.version = "1.0"; 60 appInfo.version = "1.0";
61 appInfo.name = "abpshell"; 61 appInfo.name = "abpshell";
62 appInfo.application = "standalone"; 62 appInfo.application = "standalone";
63 appInfo.applicationVersion = "1.0"; 63 appInfo.applicationVersion = "1.0";
64 appInfo.locale = "en-US"; 64 appInfo.locale = "en-US";
65 65
66 AdblockPlus::Platform platform; 66 AdblockPlus::Platform platform;
67 platform.SetUpJsEngine(appInfo); 67 platform.SetUpJsEngine(appInfo);
68 AdblockPlus::JsEnginePtr jsEngine = platform.GetJsEngine(); 68 AdblockPlus::JsEnginePtr jsEngine = platform.GetJsEngine();
69 auto filterEngine = AdblockPlus::FilterEngine::Create(jsEngine); 69 auto filterEngine = platform.GetFilterEngine();
70 70
71 CommandMap commands; 71 CommandMap commands;
72 Add(commands, new GcCommand(jsEngine)); 72 Add(commands, new GcCommand(jsEngine));
73 Add(commands, new HelpCommand(commands)); 73 Add(commands, new HelpCommand(commands));
74 Add(commands, new FiltersCommand(*filterEngine)); 74 Add(commands, new FiltersCommand(*filterEngine));
75 Add(commands, new SubscriptionsCommand(*filterEngine)); 75 Add(commands, new SubscriptionsCommand(*filterEngine));
76 Add(commands, new MatchesCommand(*filterEngine)); 76 Add(commands, new MatchesCommand(*filterEngine));
77 Add(commands, new PrefsCommand(*filterEngine)); 77 Add(commands, new PrefsCommand(*filterEngine));
78 78
79 std::string commandLine; 79 std::string commandLine;
(...skipping 15 matching lines...) Expand all
95 std::cout << error.what() << std::endl; 95 std::cout << error.what() << std::endl;
96 } 96 }
97 } 97 }
98 } 98 }
99 catch (const std::exception& e) 99 catch (const std::exception& e)
100 { 100 {
101 std::cerr << "Exception: " << e.what() << std::endl; 101 std::cerr << "Exception: " << e.what() << std::endl;
102 } 102 }
103 return 0; 103 return 0;
104 } 104 }
OLDNEW
« no previous file with comments | « include/AdblockPlus/Platform.h ('k') | src/FilterEngine.cpp » ('j') | test/BaseJsTest.h » ('J')

Powered by Google App Engine
This is Rietveld