Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 #if defined(OS_WIN) 128 #if defined(OS_WIN)
129 #include "chrome/browser/chrome_browser_main_win.h" 129 #include "chrome/browser/chrome_browser_main_win.h"
130 #include "sandbox/win/src/sandbox_policy.h" 130 #include "sandbox/win/src/sandbox_policy.h"
131 #elif defined(OS_MACOSX) 131 #elif defined(OS_MACOSX)
132 #include "chrome/browser/chrome_browser_main_mac.h" 132 #include "chrome/browser/chrome_browser_main_mac.h"
133 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" 133 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h"
134 #elif defined(OS_CHROMEOS) 134 #elif defined(OS_CHROMEOS)
135 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" 135 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
136 #include "chrome/browser/chromeos/login/user_manager.h" 136 #include "chrome/browser/chromeos/login/user_manager.h"
137 #include "chromeos/chromeos_switches.h"
137 #elif defined(OS_LINUX) 138 #elif defined(OS_LINUX)
138 #include "chrome/browser/chrome_browser_main_linux.h" 139 #include "chrome/browser/chrome_browser_main_linux.h"
139 #elif defined(OS_ANDROID) 140 #elif defined(OS_ANDROID)
140 #include "chrome/browser/android/crash_dump_manager.h" 141 #include "chrome/browser/android/crash_dump_manager.h"
141 #include "chrome/browser/chrome_browser_main_android.h" 142 #include "chrome/browser/chrome_browser_main_android.h"
142 #include "chrome/common/descriptors_android.h" 143 #include "chrome/common/descriptors_android.h"
143 #elif defined(OS_POSIX) 144 #elif defined(OS_POSIX)
144 #include "chrome/browser/chrome_browser_main_posix.h" 145 #include "chrome/browser/chrome_browser_main_posix.h"
145 #endif 146 #endif
146 147
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 if (browser_command_line.HasSwitch(switches::kChromeFrame)) 1101 if (browser_command_line.HasSwitch(switches::kChromeFrame))
1101 command_line->AppendSwitch(switches::kChromeFrame); 1102 command_line->AppendSwitch(switches::kChromeFrame);
1102 1103
1103 if (process_type == switches::kRendererProcess) { 1104 if (process_type == switches::kRendererProcess) {
1104 base::FilePath user_data_dir = 1105 base::FilePath user_data_dir =
1105 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); 1106 browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
1106 if (!user_data_dir.empty()) 1107 if (!user_data_dir.empty())
1107 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); 1108 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
1108 #if defined(OS_CHROMEOS) 1109 #if defined(OS_CHROMEOS)
1109 const std::string& login_profile = 1110 const std::string& login_profile =
1110 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); 1111 browser_command_line.GetSwitchValueASCII(
1112 chromeos::switches::kLoginProfile);
1111 if (!login_profile.empty()) 1113 if (!login_profile.empty())
1112 command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile); 1114 command_line->AppendSwitchASCII(
1115 chromeos::switches::kLoginProfile, login_profile);
1113 #endif 1116 #endif
1114 1117
1115 content::RenderProcessHost* process = 1118 content::RenderProcessHost* process =
1116 content::RenderProcessHost::FromID(child_process_id); 1119 content::RenderProcessHost::FromID(child_process_id);
1117 if (process) { 1120 if (process) {
1118 Profile* profile = Profile::FromBrowserContext( 1121 Profile* profile = Profile::FromBrowserContext(
1119 process->GetBrowserContext()); 1122 process->GetBrowserContext());
1120 ExtensionService* extension_service = 1123 ExtensionService* extension_service =
1121 extensions::ExtensionSystem::Get(profile)->extension_service(); 1124 extensions::ExtensionSystem::Get(profile)->extension_service();
1122 if (extension_service) { 1125 if (extension_service) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 static const char* const kSwitchNames[] = { 1213 static const char* const kSwitchNames[] = {
1211 switches::kAllowHTTPBackgroundPage, 1214 switches::kAllowHTTPBackgroundPage,
1212 switches::kEnableExperimentalExtensionApis, 1215 switches::kEnableExperimentalExtensionApis,
1213 switches::kWhitelistedExtensionID, 1216 switches::kWhitelistedExtensionID,
1214 }; 1217 };
1215 1218
1216 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1219 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
1217 arraysize(kSwitchNames)); 1220 arraysize(kSwitchNames));
1218 } else if (process_type == switches::kPluginProcess) { 1221 } else if (process_type == switches::kPluginProcess) {
1219 static const char* const kSwitchNames[] = { 1222 static const char* const kSwitchNames[] = {
1220 #if defined(OS_CHROMEOS) 1223 #if defined(OS_CHROMEOS)
1221 switches::kLoginProfile, 1224 chromeos::switches::kLoginProfile,
1222 #endif 1225 #endif
1223 switches::kMemoryProfiling, 1226 switches::kMemoryProfiling,
1224 switches::kSilentDumpOnDCHECK, 1227 switches::kSilentDumpOnDCHECK,
1225 switches::kUserDataDir, 1228 switches::kUserDataDir,
1226 }; 1229 };
1227 1230
1228 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1231 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
1229 arraysize(kSwitchNames)); 1232 arraysize(kSwitchNames));
1230 } else if (process_type == switches::kZygoteProcess) { 1233 } else if (process_type == switches::kZygoteProcess) {
1231 static const char* const kSwitchNames[] = { 1234 static const char* const kSwitchNames[] = {
1232 switches::kUserDataDir, // Make logs go to the right file. 1235 switches::kUserDataDir, // Make logs go to the right file.
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 io_thread_application_locale_ = locale; 2186 io_thread_application_locale_ = locale;
2184 } 2187 }
2185 2188
2186 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 2189 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
2187 const std::string& locale) { 2190 const std::string& locale) {
2188 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2191 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2189 io_thread_application_locale_ = locale; 2192 io_thread_application_locale_ = locale;
2190 } 2193 }
2191 2194
2192 } // namespace chrome 2195 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698