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

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

Issue 220018: Makes Chrome on Chrome OS not restore the last session if the last... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/defaults.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser_init.h" 5 #include "chrome/browser/browser_init.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "app/win_util.h" 10 #include "app/win_util.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 bool BrowserInit::LaunchWithProfile::OpenStartupURLs( 493 bool BrowserInit::LaunchWithProfile::OpenStartupURLs(
494 bool is_process_startup, 494 bool is_process_startup,
495 const std::vector<GURL>& urls_to_open) { 495 const std::vector<GURL>& urls_to_open) {
496 SessionStartupPref pref = GetSessionStartupPref(command_line_, profile_); 496 SessionStartupPref pref = GetSessionStartupPref(command_line_, profile_);
497 switch (pref.type) { 497 switch (pref.type) {
498 case SessionStartupPref::LAST: 498 case SessionStartupPref::LAST:
499 if (!is_process_startup) 499 if (!is_process_startup)
500 return false; 500 return false;
501 501
502 if (!profile_->DidLastSessionExitCleanly() && 502 if (!profile_->DidLastSessionExitCleanly() &&
503 !browser_defaults::kRestoreAfterCrash &&
504 !command_line_.HasSwitch(switches::kRestoreLastSession)) { 503 !command_line_.HasSwitch(switches::kRestoreLastSession)) {
505 // The last session crashed. It's possible automatically loading the 504 // The last session crashed. It's possible automatically loading the
506 // page will trigger another crash, locking the user out of chrome. 505 // page will trigger another crash, locking the user out of chrome.
507 // To avoid this, don't restore on startup but instead show the crashed 506 // To avoid this, don't restore on startup but instead show the crashed
508 // infobar. 507 // infobar.
509 return false; 508 return false;
510 } 509 }
511 SessionRestore::RestoreSessionSynchronously(profile_, urls_to_open); 510 SessionRestore::RestoreSessionSynchronously(profile_, urls_to_open);
512 return true; 511 return true;
513 512
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 scoped_refptr<AutomationProviderClass> automation = 824 scoped_refptr<AutomationProviderClass> automation =
826 new AutomationProviderClass(profile); 825 new AutomationProviderClass(profile);
827 automation->ConnectToChannel(channel_id); 826 automation->ConnectToChannel(channel_id);
828 automation->SetExpectedTabCount(expected_tabs); 827 automation->SetExpectedTabCount(expected_tabs);
829 828
830 AutomationProviderList* list = 829 AutomationProviderList* list =
831 g_browser_process->InitAutomationProviderList(); 830 g_browser_process->InitAutomationProviderList();
832 DCHECK(list); 831 DCHECK(list);
833 list->AddProvider(automation); 832 list->AddProvider(automation);
834 } 833 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/defaults.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698