diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 04:19:19 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 04:19:19 +0000 |
commit | eaf93d40a1230139c2e5b8b0772930f8a4aa3660 (patch) | |
tree | e9ea0f13bb94f60ae0b898e33f396540bf5d3640 /chrome/browser/browser_init.cc | |
parent | b195ea8977609c6f04c0ba1c7922b596a224e126 (diff) | |
download | chromium_src-eaf93d40a1230139c2e5b8b0772930f8a4aa3660.zip chromium_src-eaf93d40a1230139c2e5b8b0772930f8a4aa3660.tar.gz chromium_src-eaf93d40a1230139c2e5b8b0772930f8a4aa3660.tar.bz2 |
Makes the default for what to do on startup be restore last session on
chrome os as well as changing autocomplete edit/popup font sizes on
chrome os. As suggested by Evan I've moved these options into
chrome/browser/defaults.h so that we don't have a ton of #ifdefs every
where.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/155576
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r-- | chrome/browser/browser_init.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 05d614a..a93bea4 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -25,6 +25,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_window.h" +#include "chrome/browser/defaults.h" #if defined(OS_WIN) // TODO(port) #include "chrome/browser/extensions/extension_creator.h" #endif @@ -513,6 +514,7 @@ bool BrowserInit::LaunchWithProfile::OpenStartupURLs( return false; if (!profile_->DidLastSessionExitCleanly() && + !browser_defaults::kRestoreAfterCrash && !command_line_.HasSwitch(switches::kRestoreLastSession)) { // The last session crashed. It's possible automatically loading the // page will trigger another crash, locking the user out of chrome. @@ -564,7 +566,7 @@ Browser* BrowserInit::LaunchWithProfile::OpenURLsInBrowser( urls[i], GURL(), PageTransition::START_PAGE, (i == 0), -1, false, NULL); if (i < static_cast<size_t>(pin_count)) browser->tabstrip_model()->SetTabPinned(browser->tab_count() - 1, true); - if (i == 0 && process_startup) + if (i == 0 && process_startup && !browser_defaults::kSuppressCrashInfoBar) AddCrashedInfoBarIfNecessary(tab); } browser->window()->Show(); @@ -577,11 +579,6 @@ Browser* BrowserInit::LaunchWithProfile::OpenURLsInBrowser( void BrowserInit::LaunchWithProfile::AddCrashedInfoBarIfNecessary( TabContents* tab) { -#if defined(OS_CHROMEOS) - // Because of how chrome os currently shuts down chrome always appears to - // crash. For the time being we're working around that here. - return; -#else // Assume that if the user is launching incognito they were previously // running incognito so that we have nothing to restore from. if (!profile_->DidLastSessionExitCleanly() && @@ -591,7 +588,6 @@ void BrowserInit::LaunchWithProfile::AddCrashedInfoBarIfNecessary( // it is closed. tab->AddInfoBar(new SessionCrashedInfoBarDelegate(tab)); } -#endif } std::vector<GURL> BrowserInit::LaunchWithProfile::GetURLsFromCommandLine( |