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

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

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Patch Set: rebase only Created Nov. 26, 2015, 1:07 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/PluginSettings.cpp ('k') | src/plugin/PluginTabBase.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include "PluginStdAfx.h" 18 #include "PluginStdAfx.h"
19 #include "PluginSystem.h" 19 #include "PluginSystem.h"
20 #include "PluginClientBase.h"
21 #include <array> 20 #include <array>
22 21
23 std::wstring GetBrowserLanguage() 22 std::wstring GetBrowserLanguage()
24 { 23 {
25 LANGID lcid = GetUserDefaultLangID(); 24 LANGID lcid = GetUserDefaultLangID();
26 std::wstring lang; 25 std::wstring lang;
27 // According to http://msdn.microsoft.com/en-us/library/windows/desktop/dd3738 48(v=vs.85).aspx 26 // According to http://msdn.microsoft.com/en-us/library/windows/desktop/dd3738 48(v=vs.85).aspx
28 // The maximum number of characters allowed for this string is nine, including a terminating null character. 27 // The maximum number of characters allowed for this string is nine, including a terminating null character.
29 { 28 {
30 std::array<wchar_t, 9> localeLanguage; 29 std::array<wchar_t, 9> localeLanguage;
(...skipping 15 matching lines...) Expand all
46 { 45 {
47 DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSIN FO_BROWSER_LANGUAGE, "System::GetBrowserLang - failed to retrieve country"); 46 DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSIN FO_BROWSER_LANGUAGE, "System::GetBrowserLang - failed to retrieve country");
48 } 47 }
49 else 48 else
50 { 49 {
51 lang += localeCountry.data(); 50 lang += localeCountry.data();
52 } 51 }
53 } 52 }
54 return lang; 53 return lang;
55 } 54 }
OLDNEW
« no previous file with comments | « src/plugin/PluginSettings.cpp ('k') | src/plugin/PluginTabBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld