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

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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 void ComponentLoader::RegisterUserPrefs(PrefServiceSyncable* prefs) { 430 void ComponentLoader::RegisterUserPrefs(PrefServiceSyncable* prefs) {
431 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreURL, 431 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreURL,
432 std::string() /* default_value */, 432 std::string() /* default_value */,
433 PrefServiceSyncable::UNSYNCABLE_PREF); 433 PrefServiceSyncable::UNSYNCABLE_PREF);
434 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreName, 434 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreName,
435 std::string() /* default_value */, 435 std::string() /* default_value */,
436 PrefServiceSyncable::UNSYNCABLE_PREF); 436 PrefServiceSyncable::UNSYNCABLE_PREF);
437 } 437 }
438 438
439 } // namespace extensions 439 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698