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

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

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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"
11 #endif 11 #endif
12 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/common/chrome_version_info.h" 15 #include "chrome/common/chrome_version_info.h"
16 #include "chrome/common/extensions/extension.h" 16 #include "chrome/common/extensions/extension.h"
17 #include "chrome/common/extensions/manifest.h"
17 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
18 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
19 20
20 namespace { 21 namespace {
21 22
22 const char kGmailId[] = "pjkljhegncpnkpknbcohdijeoejaedia"; 23 const char kGmailId[] = "pjkljhegncpnkpknbcohdijeoejaedia";
23 const char kSearchId[] = "coobgpohoikkiipiblmjeljniedjpjpf"; 24 const char kSearchId[] = "coobgpohoikkiipiblmjeljniedjpjpf";
24 const char kYoutubeId[] = "blpcfgokakmgnkcojhhkbfbldkacnbeo"; 25 const char kYoutubeId[] = "blpcfgokakmgnkcojhhkbfbldkacnbeo";
25 26
26 // Returns true if the app was a default app in Chrome 22 27 // Returns true if the app was a default app in Chrome 22
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 kNeverInstallDefaultApps); 126 kNeverInstallDefaultApps);
126 } 127 }
127 } 128 }
128 129
129 return install_apps; 130 return install_apps;
130 } 131 }
131 132
132 Provider::Provider(Profile* profile, 133 Provider::Provider(Profile* profile,
133 VisitorInterface* service, 134 VisitorInterface* service,
134 extensions::ExternalLoader* loader, 135 extensions::ExternalLoader* loader,
135 extensions::Extension::Location crx_location, 136 extensions::Manifest::Location crx_location,
136 extensions::Extension::Location download_location, 137 extensions::Manifest::Location download_location,
137 int creation_flags) 138 int creation_flags)
138 : extensions::ExternalProviderImpl(service, loader, crx_location, 139 : extensions::ExternalProviderImpl(service, loader, crx_location,
139 download_location, creation_flags), 140 download_location, creation_flags),
140 profile_(profile), 141 profile_(profile),
141 is_migration_(false) { 142 is_migration_(false) {
142 DCHECK(profile); 143 DCHECK(profile);
143 set_auto_acknowledge(true); 144 set_auto_acknowledge(true);
144 } 145 }
145 146
146 void Provider::VisitRegisteredExtension() { 147 void Provider::VisitRegisteredExtension() {
(...skipping 19 matching lines...) Expand all
166 for (std::set<std::string>::iterator it = new_default_apps.begin(); 167 for (std::set<std::string>::iterator it = new_default_apps.begin();
167 it != new_default_apps.end(); ++it) { 168 it != new_default_apps.end(); ++it) {
168 prefs->Remove(*it, NULL); 169 prefs->Remove(*it, NULL);
169 } 170 }
170 } 171 }
171 172
172 ExternalProviderImpl::SetPrefs(prefs); 173 ExternalProviderImpl::SetPrefs(prefs);
173 } 174 }
174 175
175 } // namespace default_apps 176 } // namespace default_apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698