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

Side by Side Diff: src/plugin/AdblockPlusClient.cpp

Issue 5081266177179648: Issue 1104 - Cannot uncheck Disable on website option in tool bar (Closed)
Patch Set: Created Feb. 23, 2015, 12:40 p.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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 bool CAdblockPlusClient::IsFirstRun() 389 bool CAdblockPlusClient::IsFirstRun()
390 { 390 {
391 DEBUG_GENERAL("IsFirstRun"); 391 DEBUG_GENERAL("IsFirstRun");
392 Communication::InputBuffer response; 392 Communication::InputBuffer response;
393 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, response)) ret urn false; 393 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, response)) ret urn false;
394 bool res; 394 bool res;
395 response >> res; 395 response >> res;
396 return res; 396 return res;
397 } 397 }
398 398
399 void CAdblockPlusClient::AddFilter(const std::wstring& text) 399 void CAdblockPlusClient::AddWhiteListedDomain(const std::wstring& domain)
400 { 400 {
401 Communication::OutputBuffer request; 401 Communication::OutputBuffer request;
402 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); 402 request << Communication::PROC_ADD_WHITELSITED_DOMAIN << ToUtf8String(domain);
403 CallEngine(request); 403 CallEngine(request);
404 } 404 }
405 405
406 void CAdblockPlusClient::RemoveFilter(const std::wstring& text) 406 void CAdblockPlusClient::RemoveWhiteListedDomain(const std::wstring& domain)
407 { 407 {
408 Communication::OutputBuffer request; 408 Communication::OutputBuffer request;
409 request << Communication::PROC_REMOVE_FILTER << ToUtf8String(text); 409 request << Communication::PROC_REMOVE_WHITELSITED_DOMAIN << ToUtf8String(domai n);
410 CallEngine(request); 410 CallEngine(request);
411 } 411 }
412 412
413 void CAdblockPlusClient::ToggleWhitelisting(const std::wstring& url)
414 {
415 Communication::OutputBuffer request;
416 request << Communication::PROC_TOGGLE_WHITELISTING << ToUtf8String(url);
417 CallEngine(request);
418 }
419
413 void CAdblockPlusClient::SetPref(const std::wstring& name, const std::wstring& v alue) 420 void CAdblockPlusClient::SetPref(const std::wstring& name, const std::wstring& v alue)
414 { 421 {
415 Communication::OutputBuffer request; 422 Communication::OutputBuffer request;
416 request << Communication::PROC_SET_PREF << ToUtf8String(name) << ToUtf8String( value); 423 request << Communication::PROC_SET_PREF << ToUtf8String(name) << ToUtf8String( value);
417 CallEngine(request); 424 CallEngine(request);
418 } 425 }
419 426
420 void CAdblockPlusClient::SetPref(const std::wstring& name, const int64_t & value ) 427 void CAdblockPlusClient::SetPref(const std::wstring& name, const int64_t & value )
421 { 428 {
422 Communication::OutputBuffer request; 429 Communication::OutputBuffer request;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 DEBUG_GENERAL("CompareVersions"); 564 DEBUG_GENERAL("CompareVersions");
558 Communication::OutputBuffer request; 565 Communication::OutputBuffer request;
559 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2); 566 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2);
560 Communication::InputBuffer response; 567 Communication::InputBuffer response;
561 if (!CallEngine(request, response)) 568 if (!CallEngine(request, response))
562 return 0; 569 return 0;
563 int result; 570 int result;
564 response >> result; 571 response >> result;
565 return result; 572 return result;
566 } 573 }
OLDNEW

Powered by Google App Engine
This is Rietveld