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

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

Issue 5109791353470976: Issue #1234 - standardize some string conversions (Closed)
Patch Set: Created Aug. 6, 2014, 8:19 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 | « no previous file | src/plugin/AdblockPlusDomTraverser.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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 void CAdblockPlusClient::SetPref(const std::wstring& name, bool value) 433 void CAdblockPlusClient::SetPref(const std::wstring& name, bool value)
434 { 434 {
435 Communication::OutputBuffer request; 435 Communication::OutputBuffer request;
436 request << Communication::PROC_SET_PREF << ToUtf8String(name) << value; 436 request << Communication::PROC_SET_PREF << ToUtf8String(name) << value;
437 CallEngine(request); 437 CallEngine(request);
438 } 438 }
439 439
440 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const wchar_t * defaultValue) 440 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const wchar_t * defaultValue)
441 { 441 {
442 return GetPref(name, std::wstring(defaultValue)); 442 return GetPref(name, defaultValue);
443 } 443 }
444 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const std::ws tring& defaultValue) 444 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const std::ws tring& defaultValue)
445 { 445 {
446 DEBUG_GENERAL((L"GetPref: " + name + L" start").c_str()); 446 DEBUG_GENERAL((L"GetPref: " + name + L" start").c_str());
447 Communication::OutputBuffer request; 447 Communication::OutputBuffer request;
448 request << Communication::PROC_GET_PREF << ToUtf8String(name); 448 request << Communication::PROC_GET_PREF << ToUtf8String(name);
449 449
450 Communication::InputBuffer response; 450 Communication::InputBuffer response;
451 if (!CallEngine(request, response)) 451 if (!CallEngine(request, response))
452 return defaultValue; 452 return defaultValue;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 Communication::OutputBuffer request; 550 Communication::OutputBuffer request;
551 request << Communication::PROC_GET_HOST << ToUtf8String(url); 551 request << Communication::PROC_GET_HOST << ToUtf8String(url);
552 552
553 Communication::InputBuffer response; 553 Communication::InputBuffer response;
554 if (!CallEngine(request, response)) 554 if (!CallEngine(request, response))
555 return L""; 555 return L"";
556 std::string host; 556 std::string host;
557 response >> host; 557 response >> host;
558 return ToUtf16String(host); 558 return ToUtf16String(host);
559 } 559 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/AdblockPlusDomTraverser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld