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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/prefs/pref_service.h" | |
15 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
16 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/first_run/first_run.h" | 16 #include "chrome/browser/first_run/first_run.h" |
18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 19 #include "chrome/common/extensions/extension_constants.h" |
21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
22 #include "components/pref_registry/pref_registry_syncable.h" | 21 #include "components/pref_registry/pref_registry_syncable.h" |
| 22 #include "components/prefs/pref_service.h" |
23 #include "components/version_info/version_info.h" | 23 #include "components/version_info/version_info.h" |
24 #include "extensions/common/extension.h" | 24 #include "extensions/common/extension.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Returns true if the app was a default app in Chrome 22 | 28 // Returns true if the app was a default app in Chrome 22 |
29 bool IsOldDefaultApp(const std::string& extension_id) { | 29 bool IsOldDefaultApp(const std::string& extension_id) { |
30 return extension_id == extension_misc::kGmailAppId || | 30 return extension_id == extension_misc::kGmailAppId || |
31 extension_id == extension_misc::kYoutubeAppId; | 31 extension_id == extension_misc::kYoutubeAppId; |
32 } | 32 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 for (std::set<std::string>::iterator it = new_default_apps.begin(); | 158 for (std::set<std::string>::iterator it = new_default_apps.begin(); |
159 it != new_default_apps.end(); ++it) { | 159 it != new_default_apps.end(); ++it) { |
160 prefs->Remove(*it, NULL); | 160 prefs->Remove(*it, NULL); |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 ExternalProviderImpl::SetPrefs(prefs); | 164 ExternalProviderImpl::SetPrefs(prefs); |
165 } | 165 } |
166 | 166 |
167 } // namespace default_apps | 167 } // namespace default_apps |
OLD | NEW |