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

Delta Between Two Patch Sets: src/engine/Main.cpp

Issue 11369200: Disable everywhere fix (Closed)
Left Patch Set: Created Aug. 13, 2013, 2:18 p.m.
Right Patch Set: TogglePluginEnabled transfered to engine Created Aug. 20, 2013, 7:34 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/plugin/AdblockPlusClient.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 #include <AdblockPlus.h> 1 #include <AdblockPlus.h>
2 #include <functional> 2 #include <functional>
3 #include <vector> 3 #include <vector>
4 #include <Windows.h> 4 #include <Windows.h>
5 5
6 #include "../shared/AutoHandle.h" 6 #include "../shared/AutoHandle.h"
7 #include "../shared/Communication.h" 7 #include "../shared/Communication.h"
8 #include "../shared/Dictionary.h" 8 #include "../shared/Dictionary.h"
9 #include "../shared/Utils.h" 9 #include "../shared/Utils.h"
10 #include "../shared/Version.h" 10 #include "../shared/Version.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 { 259 {
260 response << false; 260 response << false;
261 } 261 }
262 break; 262 break;
263 } 263 }
264 case Communication::PROC_GET_DOCUMENTATION_LINK: 264 case Communication::PROC_GET_DOCUMENTATION_LINK:
265 { 265 {
266 response << ToUtf16String(filterEngine->GetPref("documentation_link")->A sString()); 266 response << ToUtf16String(filterEngine->GetPref("documentation_link")->A sString());
267 break; 267 break;
268 } 268 }
269 269 case Communication::PROC_TOGGLE_PLUGIN_ENABLED:
270 {
271 filterEngine->SetPref("enabled", filterEngine->GetJsEngine()->NewValue(! filterEngine->GetPref("enabled")->AsBool()));
272 response << filterEngine->GetPref("enabled")->AsBool();
273 break;
274 }
270 } 275 }
271 return response; 276 return response;
272 } 277 }
273 278
274 DWORD WINAPI ClientThread(LPVOID param) 279 DWORD WINAPI ClientThread(LPVOID param)
275 { 280 {
276 std::auto_ptr<Communication::Pipe> pipe(static_cast<Communication::Pipe*>(pa ram)); 281 std::auto_ptr<Communication::Pipe> pipe(static_cast<Communication::Pipe*>(pa ram));
277 282
278 std::stringstream stream; 283 std::stringstream stream;
279 stream << GetCurrentThreadId(); 284 stream << GetCurrentThreadId();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 406 }
402 catch (std::runtime_error e) 407 catch (std::runtime_error e)
403 { 408 {
404 DebugException(e); 409 DebugException(e);
405 return 1; 410 return 1;
406 } 411 }
407 } 412 }
408 413
409 return 0; 414 return 0;
410 } 415 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld