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

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

Issue 6025347820683264: Issue 1106 - Enable Acceptable Ads by default for new installs and updates from versions < 1.2 (Closed)
Patch Set: Discriminate first run page title for install/update Created Aug. 1, 2014, 3:08 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
« no previous file with comments | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 #include "PluginSettings.h" 2 #include "PluginSettings.h"
3 #include "PluginSystem.h" 3 #include "PluginSystem.h"
4 #include "PluginFilter.h" 4 #include "PluginFilter.h"
5 #include "PluginClientFactory.h" 5 #include "PluginClientFactory.h"
6 #include "PluginMutex.h" 6 #include "PluginMutex.h"
7 #include "PluginClass.h" 7 #include "PluginClass.h"
8 8
9 #include "AdblockPlusClient.h" 9 #include "AdblockPlusClient.h"
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 bool CAdblockPlusClient::IsFirstRun() 396 bool CAdblockPlusClient::IsFirstRun()
397 { 397 {
398 DEBUG_GENERAL("IsFirstRun"); 398 DEBUG_GENERAL("IsFirstRun");
399 Communication::InputBuffer response; 399 Communication::InputBuffer response;
400 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, response)) ret urn false; 400 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, response)) ret urn false;
401 bool res; 401 bool res;
402 response >> res; 402 response >> res;
403 return res; 403 return res;
404 } 404 }
405
405 void CAdblockPlusClient::AddFilter(const std::wstring& text) 406 void CAdblockPlusClient::AddFilter(const std::wstring& text)
406 { 407 {
407 Communication::OutputBuffer request; 408 Communication::OutputBuffer request;
408 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); 409 request << Communication::PROC_ADD_FILTER << ToUtf8String(text);
409 CallEngine(request); 410 CallEngine(request);
410 } 411 }
411 412
412 void CAdblockPlusClient::RemoveFilter(const std::wstring& text) 413 void CAdblockPlusClient::RemoveFilter(const std::wstring& text)
413 { 414 {
414 Communication::OutputBuffer request; 415 Communication::OutputBuffer request;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 Communication::OutputBuffer request; 551 Communication::OutputBuffer request;
551 request << Communication::PROC_GET_HOST << ToUtf8String(url); 552 request << Communication::PROC_GET_HOST << ToUtf8String(url);
552 553
553 Communication::InputBuffer response; 554 Communication::InputBuffer response;
554 if (!CallEngine(request, response)) 555 if (!CallEngine(request, response))
555 return L""; 556 return L"";
556 std::string host; 557 std::string host;
557 response >> host; 558 response >> host;
558 return ToUtf16String(host); 559 return ToUtf16String(host);
559 } 560 }
561
562 int CAdblockPlusClient::CompareVersions(const std::wstring& v1, const std::wstri ng& v2)
563 {
564 DEBUG_GENERAL("CompareVersions");
565 Communication::OutputBuffer request;
566 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2);
567 Communication::InputBuffer response;
568 if (!CallEngine(request, response))
569 return 0;
570 int result;
571 response >> result;
572 return result;
573 }
OLDNEW
« no previous file with comments | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld