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

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

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 11 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 | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_list.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 // Stores the value of the preference kWasRestarted had when it was read. 741 // Stores the value of the preference kWasRestarted had when it was read.
742 static bool was_restarted = false; 742 static bool was_restarted = false;
743 743
744 // True if we have already read and reset the preference kWasRestarted. 744 // True if we have already read and reset the preference kWasRestarted.
745 static bool was_restarted_read = false; 745 static bool was_restarted_read = false;
746 746
747 if (!was_restarted_read) { 747 if (!was_restarted_read) {
748 PrefService* pref_service = g_browser_process->local_state(); 748 PrefService* pref_service = g_browser_process->local_state();
749 was_restarted = pref_service->GetBoolean(prefs::kWasRestarted); 749 was_restarted = pref_service->GetBoolean(prefs::kWasRestarted);
750 pref_service->SetBoolean(prefs::kWasRestarted, false); 750 pref_service->SetBoolean(prefs::kWasRestarted, false);
751 pref_service->ScheduleSavePersistentPrefs();
752 was_restarted_read = true; 751 was_restarted_read = true;
753 } 752 }
754 return was_restarted; 753 return was_restarted;
755 } 754 }
756 755
757 // BrowserInit::LaunchWithProfile::Tab ---------------------------------------- 756 // BrowserInit::LaunchWithProfile::Tab ----------------------------------------
758 757
759 BrowserInit::LaunchWithProfile::Tab::Tab() : is_app(false), is_pinned(true) {} 758 BrowserInit::LaunchWithProfile::Tab::Tab() : is_app(false), is_pinned(true) {}
760 759
761 BrowserInit::LaunchWithProfile::Tab::~Tab() {} 760 BrowserInit::LaunchWithProfile::Tab::~Tab() {}
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 1715
1717 Profile* profile = ProfileManager::GetLastUsedProfile(); 1716 Profile* profile = ProfileManager::GetLastUsedProfile();
1718 if (!profile) { 1717 if (!profile) {
1719 // We should only be able to get here if the profile already exists and 1718 // We should only be able to get here if the profile already exists and
1720 // has been created. 1719 // has been created.
1721 NOTREACHED(); 1720 NOTREACHED();
1722 return; 1721 return;
1723 } 1722 }
1724 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, NULL, NULL); 1723 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, NULL, NULL);
1725 } 1724 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698