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

Side by Side Diff: chrome/browser/extensions/component_loader.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/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 void ComponentLoader::Load(const ComponentExtensionInfo& info) { 176 void ComponentLoader::Load(const ComponentExtensionInfo& info) {
177 // TODO(abarth): We should REQUIRE_MODERN_MANIFEST_VERSION once we've updated 177 // TODO(abarth): We should REQUIRE_MODERN_MANIFEST_VERSION once we've updated
178 // our component extensions to the new manifest version. 178 // our component extensions to the new manifest version.
179 int flags = Extension::REQUIRE_KEY; 179 int flags = Extension::REQUIRE_KEY;
180 180
181 std::string error; 181 std::string error;
182 182
183 scoped_refptr<const Extension> extension(Extension::Create( 183 scoped_refptr<const Extension> extension(Extension::Create(
184 info.root_directory, 184 info.root_directory,
185 Extension::COMPONENT, 185 Manifest::COMPONENT,
186 *info.manifest, 186 *info.manifest,
187 flags, 187 flags,
188 &error)); 188 &error));
189 if (!extension.get()) { 189 if (!extension.get()) {
190 LOG(ERROR) << error; 190 LOG(ERROR) << error;
191 return; 191 return;
192 } 192 }
193 193
194 CHECK_EQ(info.extension_id, extension->id()) << extension->name(); 194 CHECK_EQ(info.extension_id, extension->id()) << extension->name();
195 extension_service_->AddComponentExtension(extension); 195 extension_service_->AddComponentExtension(extension);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 void ComponentLoader::RegisterUserPrefs(PrefServiceSyncable* prefs) { 436 void ComponentLoader::RegisterUserPrefs(PrefServiceSyncable* prefs) {
437 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreURL, 437 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreURL,
438 std::string() /* default_value */, 438 std::string() /* default_value */,
439 PrefServiceSyncable::UNSYNCABLE_PREF); 439 PrefServiceSyncable::UNSYNCABLE_PREF);
440 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreName, 440 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreName,
441 std::string() /* default_value */, 441 std::string() /* default_value */,
442 PrefServiceSyncable::UNSYNCABLE_PREF); 442 PrefServiceSyncable::UNSYNCABLE_PREF);
443 } 443 }
444 444
445 } // namespace extensions 445 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | chrome/browser/extensions/convert_user_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698