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

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

Issue 3202004: Switch kRestoreBackgroundContents to kDisableRestoreBackgroundContents (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Eliminated append of kDisableRestoreBackgroundContents Created 10 years, 4 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
« no previous file with comments | « chrome/browser/background_contents_service_unittest.cc ('k') | chrome/common/chrome_switches.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "app/clipboard/clipboard.h" 9 #include "app/clipboard/clipboard.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 // pick up an automatic update, be sure to add it to this list. 712 // pick up an automatic update, be sure to add it to this list.
713 const char* const kSwitchesToRemoveOnAutorestart[] = { 713 const char* const kSwitchesToRemoveOnAutorestart[] = {
714 switches::kApp, 714 switches::kApp,
715 switches::kFirstRun, 715 switches::kFirstRun,
716 switches::kImport, 716 switches::kImport,
717 switches::kImportFromFile, 717 switches::kImportFromFile,
718 switches::kMakeDefaultBrowser 718 switches::kMakeDefaultBrowser
719 }; 719 };
720 720
721 const char* const kSwitchesToAddOnAutorestart[] = { 721 const char* const kSwitchesToAddOnAutorestart[] = {
722 switches::kNoStartupWindow, 722 switches::kNoStartupWindow
723 switches::kRestoreBackgroundContents
724 }; 723 };
725 724
726 void BrowserProcessImpl::RestartPersistentInstance() { 725 void BrowserProcessImpl::RestartPersistentInstance() {
727 CommandLine* old_cl = CommandLine::ForCurrentProcess(); 726 CommandLine* old_cl = CommandLine::ForCurrentProcess();
728 scoped_ptr<CommandLine> new_cl(new CommandLine(old_cl->GetProgram())); 727 scoped_ptr<CommandLine> new_cl(new CommandLine(old_cl->GetProgram()));
729 728
730 std::map<std::string, CommandLine::StringType> switches = 729 std::map<std::string, CommandLine::StringType> switches =
731 old_cl->GetSwitches(); 730 old_cl->GetSwitches();
732 731
733 // Remove the keys that we shouldn't pass through during restart. 732 // Remove the keys that we shouldn't pass through during restart.
(...skipping 27 matching lines...) Expand all
761 } 760 }
762 761
763 void BrowserProcessImpl::OnAutoupdateTimer() { 762 void BrowserProcessImpl::OnAutoupdateTimer() {
764 if (CanAutorestartForUpdate()) { 763 if (CanAutorestartForUpdate()) {
765 DLOG(WARNING) << "Detected update. Restarting browser."; 764 DLOG(WARNING) << "Detected update. Restarting browser.";
766 RestartPersistentInstance(); 765 RestartPersistentInstance();
767 } 766 }
768 } 767 }
769 768
770 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 769 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/background_contents_service_unittest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698