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

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

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 7 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
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 <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 51 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
52 registry->RegisterIntegerPref( 52 registry->RegisterIntegerPref(prefs::kDefaultAppsInstallState, kUnknown);
53 prefs::kDefaultAppsInstallState,
54 kUnknown,
55 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
56 } 53 }
57 54
58 bool Provider::ShouldInstallInProfile() { 55 bool Provider::ShouldInstallInProfile() {
59 // We decide to install or not install default apps based on the following 56 // We decide to install or not install default apps based on the following
60 // criteria, from highest priority to lowest priority: 57 // criteria, from highest priority to lowest priority:
61 // 58 //
62 // - The command line option. Tests use this option to disable installation 59 // - The command line option. Tests use this option to disable installation
63 // of default apps in some cases. 60 // of default apps in some cases.
64 // - If the locale is not compatible with the defaults, don't install them. 61 // - If the locale is not compatible with the defaults, don't install them.
65 // - The kDefaultApps preferences value in the profile. This value is 62 // - The kDefaultApps preferences value in the profile. This value is
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 for (std::set<std::string>::iterator it = new_default_apps.begin(); 156 for (std::set<std::string>::iterator it = new_default_apps.begin();
160 it != new_default_apps.end(); ++it) { 157 it != new_default_apps.end(); ++it) {
161 prefs->Remove(*it, NULL); 158 prefs->Remove(*it, NULL);
162 } 159 }
163 } 160 }
164 161
165 ExternalProviderImpl::SetPrefs(prefs); 162 ExternalProviderImpl::SetPrefs(prefs);
166 } 163 }
167 164
168 } // namespace default_apps 165 } // namespace default_apps
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/extension_management.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698