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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #if !defined(OS_ANDROID) 9 #if !defined(OS_ANDROID)
10 #include "chrome/browser/first_run/first_run.h" 10 #include "chrome/browser/first_run/first_run.h"
(...skipping 30 matching lines...) Expand all
41 return false; 41 return false;
42 } 42 }
43 } 43 }
44 return true; 44 return true;
45 } 45 }
46 46
47 } // namespace 47 } // namespace
48 48
49 namespace default_apps { 49 namespace default_apps {
50 50
51 void RegisterUserPrefs(PrefService* prefs) { 51 void RegisterUserPrefs(PrefServiceSyncable* prefs) {
52 prefs->RegisterIntegerPref(prefs::kDefaultAppsInstallState, kUnknown, 52 prefs->RegisterIntegerPref(prefs::kDefaultAppsInstallState, kUnknown,
53 PrefService::UNSYNCABLE_PREF); 53 PrefServiceSyncable::UNSYNCABLE_PREF);
54 } 54 }
55 55
56 bool Provider::ShouldInstallInProfile() { 56 bool Provider::ShouldInstallInProfile() {
57 // We decide to install or not install default apps based on the following 57 // We decide to install or not install default apps based on the following
58 // criteria, from highest priority to lowest priority: 58 // criteria, from highest priority to lowest priority:
59 // 59 //
60 // - The command line option. Tests use this option to disable installation 60 // - The command line option. Tests use this option to disable installation
61 // of default apps in some cases. 61 // of default apps in some cases.
62 // - If the locale is not compatible with the defaults, don't install them. 62 // - If the locale is not compatible with the defaults, don't install them.
63 // - The kDefaultApps preferences value in the profile. This value is 63 // - The kDefaultApps preferences value in the profile. This value is
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 for (std::set<std::string>::iterator it = new_default_apps.begin(); 166 for (std::set<std::string>::iterator it = new_default_apps.begin();
167 it != new_default_apps.end(); ++it) { 167 it != new_default_apps.end(); ++it) {
168 prefs->Remove(*it, NULL); 168 prefs->Remove(*it, NULL);
169 } 169 }
170 } 170 }
171 171
172 ExternalProviderImpl::SetPrefs(prefs); 172 ExternalProviderImpl::SetPrefs(prefs);
173 } 173 }
174 174
175 } // namespace default_apps 175 } // namespace default_apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698