summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_main.cc7
-rw-r--r--chrome/common/chrome_constants.cc9
-rw-r--r--chrome/common/chrome_paths.cc2
-rw-r--r--chrome/plugin/plugin_main.cc3
-rw-r--r--chrome/renderer/renderer_main.cc4
5 files changed, 18 insertions, 7 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index dbd4d02..e7619b3 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -248,9 +248,10 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command,
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
- const char* main_thread_name = "Chrome_BrowserMain";
- PlatformThread::SetName(main_thread_name);
- main_message_loop.set_thread_name(main_thread_name);
+ std::wstring app_name = chrome::kBrowserAppName;
+ const char* thread_name = WideToASCII(app_name + L"_BrowserMain").c_str();
+ PlatformThread::SetName(thread_name);
+ main_message_loop.set_thread_name(thread_name);
bool already_running = CreateUniqueChromeEvent();
// Make the selection of network stacks early on before any consumers try to
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 2e54c0a..2c0dcc8 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -8,14 +8,19 @@ namespace chrome {
// The following should not be used for UI strings; they are meant
// for system strings only. UI changes should be made in the GRD.
const wchar_t kBrowserProcessExecutableName[] = L"chrome.exe";
+#if defined(GOOGLE_CHROME_BUILD)
const wchar_t kBrowserAppName[] = L"Chrome";
-const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow";
+const wchar_t kStatsFilename[] = L"ChromeStats";
+#else
+const wchar_t kBrowserAppName[] = L"Chromium";
+const wchar_t kStatsFilename[] = L"ChromiumStats";
+#endif
const wchar_t kExternalTabWindowClass[] = L"Chrome_ExternalTabContainer";
+const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow";
const wchar_t kCrashReportLog[] = L"Reported Crashes.txt";
const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll";
const wchar_t kNotSignedInProfile[] = L"Default";
const wchar_t kNotSignedInID[] = L"not-signed-in";
-const wchar_t kStatsFilename[] = L"ChromeStats";
const wchar_t kBrowserResourcesDll[] = L"chrome.dll";
// filenames
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 7e8d695..7f8c3b6 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -30,7 +30,9 @@ bool GetUserDirectory(int directory_type, std::wstring* result) {
bool GetDefaultUserDataDirectory(std::wstring* result) {
if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
return false;
+#if defined(GOOGLE_CHROME_BUILD)
file_util::AppendToPath(result, L"Google");
+#endif
file_util::AppendToPath(result, chrome::kBrowserAppName);
file_util::AppendToPath(result, chrome::kUserDataDirname);
return true;
diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc
index df2dbc1..cd94008 100644
--- a/chrome/plugin/plugin_main.cc
+++ b/chrome/plugin/plugin_main.cc
@@ -17,7 +17,8 @@ int PluginMain(CommandLine &parsed_command_line, int show_command,
sandbox::TargetServices* target_services) {
// The main thread of the plugin services IO.
MessageLoopForIO main_message_loop;
- PlatformThread::SetName("Chrome_PluginMain");
+ std::wstring app_name = chrome::kBrowserAppName;
+ PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str());
CoInitialize(NULL);
DLOG(INFO) << "Started plugin with " <<
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc
index 864368c..d54a4bc 100644
--- a/chrome/renderer/renderer_main.cc
+++ b/chrome/renderer/renderer_main.cc
@@ -6,6 +6,7 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/platform_thread.h"
+#include "base/string_util.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_counters.h"
#include "chrome/common/chrome_switches.h"
@@ -50,7 +51,8 @@ int RendererMain(CommandLine &parsed_command_line, int show_command,
// The main thread of the renderer services IO.
MessageLoopForIO main_message_loop;
- PlatformThread::SetName("Chrome_RendererMain");
+ std::wstring app_name = chrome::kBrowserAppName;
+ PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str());
CoInitialize(NULL);