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

Side by Side Diff: chrome/browser/extensions/default_apps.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 12 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/extensions/apps_promo.cc ('k') | chrome/browser/extensions/extension_prefs.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) 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/extensions/default_apps.h" 5 #include "chrome/browser/extensions/default_apps.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/first_run/first_run.h" 10 #include "chrome/browser/first_run/first_run.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // manager is smart enough to know not to reinstall the apps on all 95 // manager is smart enough to know not to reinstall the apps on all
96 // subsequent runs of chrome. 96 // subsequent runs of chrome.
97 if (state == default_apps::kUnknown) { 97 if (state == default_apps::kUnknown) {
98 if (install_apps) { 98 if (install_apps) {
99 profile->GetPrefs()->SetInteger(prefs::kDefaultAppsInstallState, 99 profile->GetPrefs()->SetInteger(prefs::kDefaultAppsInstallState,
100 default_apps::kAlwaysProvideDefaultApps); 100 default_apps::kAlwaysProvideDefaultApps);
101 } else { 101 } else {
102 profile->GetPrefs()->SetInteger(prefs::kDefaultAppsInstallState, 102 profile->GetPrefs()->SetInteger(prefs::kDefaultAppsInstallState,
103 default_apps::kNeverProvideDefaultApps); 103 default_apps::kNeverProvideDefaultApps);
104 } 104 }
105 profile->GetPrefs()->ScheduleSavePersistentPrefs();
106 } 105 }
107 106
108 return install_apps; 107 return install_apps;
109 } 108 }
110 109
111 namespace default_apps { 110 namespace default_apps {
112 111
113 void RegisterUserPrefs(PrefService* prefs) { 112 void RegisterUserPrefs(PrefService* prefs) {
114 prefs->RegisterIntegerPref(prefs::kDefaultAppsInstallState, kUnknown, 113 prefs->RegisterIntegerPref(prefs::kDefaultAppsInstallState, kUnknown,
115 PrefService::UNSYNCABLE_PREF); 114 PrefService::UNSYNCABLE_PREF);
(...skipping 16 matching lines...) Expand all
132 if (!profile_ || !ShouldInstallInProfile(profile_)) { 131 if (!profile_ || !ShouldInstallInProfile(profile_)) {
133 base::DictionaryValue* prefs = new base::DictionaryValue; 132 base::DictionaryValue* prefs = new base::DictionaryValue;
134 SetPrefs(prefs); 133 SetPrefs(prefs);
135 return; 134 return;
136 } 135 }
137 136
138 ExternalExtensionProviderImpl::VisitRegisteredExtension(); 137 ExternalExtensionProviderImpl::VisitRegisteredExtension();
139 } 138 }
140 139
141 } // namespace default_apps 140 } // namespace default_apps
OLDNEW
« no previous file with comments | « chrome/browser/extensions/apps_promo.cc ('k') | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698