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

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

Issue 11292028: Status bar menu added (Closed)
Patch Set: Addressing comments. Actual functionality fixes Created Aug. 1, 2013, 10:28 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 #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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 301
302 void CAdblockPlusClient::UpdateAllSubscriptions() 302 void CAdblockPlusClient::UpdateAllSubscriptions()
303 { 303 {
304 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS); 304 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS);
305 } 305 }
306 306
307 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() 307 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains()
308 { 308 {
309 Communication::InputBuffer response; 309 Communication::InputBuffer response;
310 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS)) 310 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS, response))
311 return std::vector<std::wstring>(); 311 return std::vector<std::wstring>();
312 return ReadStrings(response); 312 return ReadStrings(response);
313 } 313 }
314 314
315 bool CAdblockPlusClient::IsFirstRun() 315 bool CAdblockPlusClient::IsFirstRun()
316 { 316 {
317 Communication::InputBuffer response; 317 Communication::InputBuffer response;
318 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, &response)) re turn false; 318 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, response)) ret urn false;
319 bool res; 319 bool res;
320 response >> res; 320 response >> res;
321 return res; 321 return res;
322 } 322 }
323 void CAdblockPlusClient::AddFilter(const std::wstring& text) 323 void CAdblockPlusClient::AddFilter(const std::wstring& text)
324 { 324 {
325 Communication::OutputBuffer request; 325 Communication::OutputBuffer request;
326 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); 326 request << Communication::PROC_ADD_FILTER << ToUtf8String(text);
327 CallEngine(request); 327 CallEngine(request);
328 } 328 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 response >> success; 410 response >> success;
411 if (success) 411 if (success)
412 { 412 {
413 int64_t value; 413 int64_t value;
414 response >> value; 414 response >> value;
415 return value; 415 return value;
416 } 416 }
417 else 417 else
418 return defaultValue; 418 return defaultValue;
419 } 419 }
OLDNEW

Powered by Google App Engine
This is Rietveld