OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 return false; | 43 return false; |
44 } | 44 } |
45 } | 45 } |
46 return true; | 46 return true; |
47 } | 47 } |
48 | 48 |
49 } // namespace | 49 } // namespace |
50 | 50 |
51 namespace default_apps { | 51 namespace default_apps { |
52 | 52 |
53 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) { | 53 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
54 registry->RegisterIntegerPref( | 54 registry->RegisterIntegerPref( |
55 prefs::kDefaultAppsInstallState, | 55 prefs::kDefaultAppsInstallState, |
56 kUnknown, | 56 kUnknown, |
57 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 57 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
58 } | 58 } |
59 | 59 |
60 bool Provider::ShouldInstallInProfile() { | 60 bool Provider::ShouldInstallInProfile() { |
61 // We decide to install or not install default apps based on the following | 61 // We decide to install or not install default apps based on the following |
62 // criteria, from highest priority to lowest priority: | 62 // criteria, from highest priority to lowest priority: |
63 // | 63 // |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 for (std::set<std::string>::iterator it = new_default_apps.begin(); | 168 for (std::set<std::string>::iterator it = new_default_apps.begin(); |
169 it != new_default_apps.end(); ++it) { | 169 it != new_default_apps.end(); ++it) { |
170 prefs->Remove(*it, NULL); | 170 prefs->Remove(*it, NULL); |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 ExternalProviderImpl::SetPrefs(prefs); | 174 ExternalProviderImpl::SetPrefs(prefs); |
175 } | 175 } |
176 | 176 |
177 } // namespace default_apps | 177 } // namespace default_apps |
OLD | NEW |