OLD | NEW |
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/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 }; | 326 }; |
327 | 327 |
328 // Initializes the user data dir. Must be called before InitializeLocalState(). | 328 // Initializes the user data dir. Must be called before InitializeLocalState(). |
329 void InitializeUserDataDir() { | 329 void InitializeUserDataDir() { |
330 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 330 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
331 base::FilePath user_data_dir = | 331 base::FilePath user_data_dir = |
332 command_line->GetSwitchValuePath(switches::kUserDataDir); | 332 command_line->GetSwitchValuePath(switches::kUserDataDir); |
333 std::string process_type = | 333 std::string process_type = |
334 command_line->GetSwitchValueASCII(switches::kProcessType); | 334 command_line->GetSwitchValueASCII(switches::kProcessType); |
335 | 335 |
| 336 #if defined(OS_ANDROID) |
| 337 // XXX: do not ship with this. |
| 338 command_line->AppendSwitch("use-ime-thread"); |
| 339 #endif |
| 340 |
336 #if defined(OS_LINUX) | 341 #if defined(OS_LINUX) |
337 // On Linux, Chrome does not support running multiple copies under different | 342 // On Linux, Chrome does not support running multiple copies under different |
338 // DISPLAYs, so the profile directory can be specified in the environment to | 343 // DISPLAYs, so the profile directory can be specified in the environment to |
339 // support the virtual desktop use-case. | 344 // support the virtual desktop use-case. |
340 if (user_data_dir.empty()) { | 345 if (user_data_dir.empty()) { |
341 std::string user_data_dir_string; | 346 std::string user_data_dir_string; |
342 scoped_ptr<base::Environment> environment(base::Environment::Create()); | 347 scoped_ptr<base::Environment> environment(base::Environment::Create()); |
343 if (environment->GetVar("CHROME_USER_DATA_DIR", &user_data_dir_string) && | 348 if (environment->GetVar("CHROME_USER_DATA_DIR", &user_data_dir_string) && |
344 base::IsStringUTF8(user_data_dir_string)) { | 349 base::IsStringUTF8(user_data_dir_string)) { |
345 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); | 350 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 case version_info::Channel::CANARY: | 950 case version_info::Channel::CANARY: |
946 return true; | 951 return true; |
947 case version_info::Channel::DEV: | 952 case version_info::Channel::DEV: |
948 case version_info::Channel::BETA: | 953 case version_info::Channel::BETA: |
949 case version_info::Channel::STABLE: | 954 case version_info::Channel::STABLE: |
950 default: | 955 default: |
951 // Don't enable instrumentation. | 956 // Don't enable instrumentation. |
952 return false; | 957 return false; |
953 } | 958 } |
954 } | 959 } |
OLD | NEW |