summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 12:15:06 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 12:15:06 +0000
commit5fc236cc8bb6ab2b4ea815e950d6f0d2185d8afd (patch)
tree20db08ba573b088f4969f2d1eba94f7c36e91b4c
parentb1fb0e811386d293a8afba5ef6314c0a139a0f2a (diff)
downloadchromium_src-5fc236cc8bb6ab2b4ea815e950d6f0d2185d8afd.zip
chromium_src-5fc236cc8bb6ab2b4ea815e950d6f0d2185d8afd.tar.gz
chromium_src-5fc236cc8bb6ab2b4ea815e950d6f0d2185d8afd.tar.bz2
Merge 201824 "Fix a bug cuased by https://codereview.chromium.or..."
> Fix a bug cuased by https://codereview.chromium.org/15053005 (Chomium Issue 242782: Initial input method list is wrong) > > BUG=chromium:242782 > > Review URL: https://chromiumcodereview.appspot.com/15722002 TBR=cylee@google.com Review URL: https://codereview.chromium.org/16032013 git-svn-id: svn://svn.chromium.org/chrome/branches/1500/src@202851 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.cc3
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator.cc42
2 files changed, 23 insertions, 22 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index d5e08fc..f5e92d7 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -1019,8 +1019,7 @@ void ExistingUserController::InitializeStartUrls() const {
// user because it will hide the Getting Started App window (which is
// launched automatically in that situation).
if (UserManager::Get()->IsCurrentUserNew()) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- ::switches::kSilentLaunch, "");
+ CommandLine::ForCurrentProcess()->AppendSwitch(::switches::kSilentLaunch);
} else {
for (size_t i = 0; i < start_urls.size(); ++i) {
CommandLine::ForCurrentProcess()->AppendArg(start_urls[i]);
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index e9f3a52..872cf8c 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -253,14 +253,6 @@ bool StartupBrowserCreator::LaunchBrowser(
chrome::startup::IsFirstRun is_first_run,
int* return_code) {
- // Note: This check should have been done in ProcessCmdLineImpl()
- // before calling this function. However chromeos/login/login_utils.cc
- // calls this function directly (see comments there) so I have to check it
- // again as a workaround.
- if (command_line.HasSwitch(switches::kSilentLaunch)) {
- return true;
- }
-
in_synchronous_profile_launch_ =
process_startup == chrome::startup::IS_PROCESS_STARTUP;
DCHECK(profile);
@@ -275,19 +267,29 @@ bool StartupBrowserCreator::LaunchBrowser(
<< "browser session.";
}
- StartupBrowserCreatorImpl lwp(cur_dir, command_line, this, is_first_run);
- std::vector<GURL> urls_to_launch =
- GetURLsFromCommandLine(command_line, cur_dir, profile);
- bool launched = lwp.Launch(profile, urls_to_launch,
- in_synchronous_profile_launch_);
- in_synchronous_profile_launch_ = false;
-
- if (!launched) {
- LOG(ERROR) << "launch error";
- if (return_code)
- *return_code = chrome::RESULT_CODE_INVALID_CMDLINE_URL;
- return false;
+ // Note: This check should have been done in ProcessCmdLineImpl()
+ // before calling this function. However chromeos/login/login_utils.cc
+ // calls this function directly (see comments there) so it has to be checked
+ // again.
+ const bool silent_launch = command_line.HasSwitch(switches::kSilentLaunch);
+
+ if (!silent_launch) {
+ StartupBrowserCreatorImpl lwp(cur_dir, command_line, this, is_first_run);
+ const std::vector<GURL> urls_to_launch =
+ GetURLsFromCommandLine(command_line, cur_dir, profile);
+ const bool launched = lwp.Launch(profile, urls_to_launch,
+ in_synchronous_profile_launch_);
+ in_synchronous_profile_launch_ = false;
+ if (!launched) {
+ LOG(ERROR) << "launch error";
+ if (return_code)
+ *return_code = chrome::RESULT_CODE_INVALID_CMDLINE_URL;
+ return false;
+ }
+ } else {
+ in_synchronous_profile_launch_ = false;
}
+
profile_launch_observer.Get().AddLaunched(profile);
#if defined(OS_CHROMEOS)