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

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

Issue 4772743157383168: Issue #276 - eliminate CString from GetBrowserLanguage (Closed)
Patch Set: Created July 30, 2014, 8:50 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/Plugin.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
11 #include "../shared/Utils.h" 11 #include "../shared/Utils.h"
12 12
13 namespace 13 namespace
14 { 14 {
15 void SpawnAdblockPlusEngine() 15 void SpawnAdblockPlusEngine()
16 { 16 {
17 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe"; 17 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe";
18 CString params = L"AdblockPlusEngine.exe " + CPluginSystem::GetInstance()->G etBrowserLanguage(); 18 CString params = to_CString(L"AdblockPlusEngine.exe " + GetBrowserLanguage() );
19 19
20 STARTUPINFO startupInfo = {}; 20 STARTUPINFO startupInfo = {};
21 PROCESS_INFORMATION processInformation = {}; 21 PROCESS_INFORMATION processInformation = {};
22 22
23 HANDLE token; 23 HANDLE token;
24 OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT | TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); 24 OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT | TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token);
25 25
26 TOKEN_APPCONTAINER_INFORMATION *acs = NULL; 26 TOKEN_APPCONTAINER_INFORMATION *acs = NULL;
27 DWORD length = 0; 27 DWORD length = 0;
28 28
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 Communication::OutputBuffer request; 529 Communication::OutputBuffer request;
530 request << Communication::PROC_GET_HOST << ToUtf8String(url); 530 request << Communication::PROC_GET_HOST << ToUtf8String(url);
531 531
532 Communication::InputBuffer response; 532 Communication::InputBuffer response;
533 if (!CallEngine(request, response)) 533 if (!CallEngine(request, response))
534 return L""; 534 return L"";
535 std::string host; 535 std::string host;
536 response >> host; 536 response >> host;
537 return ToUtf16String(host); 537 return ToUtf16String(host);
538 } 538 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/Plugin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld