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

Delta Between Two Patch Sets: src/plugin/AdblockPlusClient.cpp

Issue 11043057: First run page triggering (Closed)
Left Patch Set: Ditching the statusbarasked Created July 22, 2013, 9:01 a.m.
Right Patch Set: Minor refactoring. Renaming and a small cleanup. Created July 26, 2013, 12:05 p.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 | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/PluginClass.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 "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginSettings.h" 3 #include "PluginSettings.h"
4 #include "PluginSystem.h" 4 #include "PluginSystem.h"
5 #include "PluginFilter.h" 5 #include "PluginFilter.h"
6 #include "PluginClientFactory.h" 6 #include "PluginClientFactory.h"
7 #include "PluginMutex.h" 7 #include "PluginMutex.h"
8 #include "PluginClass.h" 8 #include "PluginClass.h"
9 9
10 #include "AdblockPlusClient.h" 10 #include "AdblockPlusClient.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS); 306 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS);
307 } 307 }
308 308
309 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() 309 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains()
310 { 310 {
311 Communication::InputBuffer response; 311 Communication::InputBuffer response;
312 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS)) return std::vector <std::wstring>(); 312 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS)) return std::vector <std::wstring>();
313 return ReadStrings(response); 313 return ReadStrings(response);
314 } 314 }
315 315
316 bool CAdblockPlusClient::IsFirstRun()
317 {
318 Communication::InputBuffer response;
319 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, &response)) re turn false;
320 bool res;
321 response >> res;
322 return res;
323 }
316 void CAdblockPlusClient::AddFilter(const std::wstring& text) 324 void CAdblockPlusClient::AddFilter(const std::wstring& text)
317 { 325 {
318 Communication::OutputBuffer request; 326 Communication::OutputBuffer request;
319 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); 327 request << Communication::PROC_ADD_FILTER << ToUtf8String(text);
320 CallEngine(request); 328 CallEngine(request);
321 } 329 }
322 330
323 void CAdblockPlusClient::RemoveFilter(const std::wstring& text) 331 void CAdblockPlusClient::RemoveFilter(const std::wstring& text)
324 { 332 {
325 Communication::OutputBuffer request; 333 Communication::OutputBuffer request;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 response >> success; 408 response >> success;
401 if (success) 409 if (success)
402 { 410 {
403 int64_t value; 411 int64_t value;
404 response >> value; 412 response >> value;
405 return value; 413 return value;
406 } 414 }
407 else 415 else
408 return defaultValue; 416 return defaultValue;
409 } 417 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld