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

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

Issue 15937003: Change loading custom auth extension to load from --auth-ext-path value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 std::string ComponentLoader::AddOrReplace(const base::FilePath& path) { 162 std::string ComponentLoader::AddOrReplace(const base::FilePath& path) {
163 base::FilePath absolute_path = base::MakeAbsoluteFilePath(path); 163 base::FilePath absolute_path = base::MakeAbsoluteFilePath(path);
164 std::string error; 164 std::string error;
165 scoped_ptr<DictionaryValue> manifest( 165 scoped_ptr<DictionaryValue> manifest(
166 extension_file_util::LoadManifest(absolute_path, &error)); 166 extension_file_util::LoadManifest(absolute_path, &error));
167 if (!manifest) { 167 if (!manifest) {
168 LOG(ERROR) << "Could not load extension from '" << 168 LOG(ERROR) << "Could not load extension from '" <<
169 absolute_path.value() << "'. " << error; 169 absolute_path.value() << "'. " << error;
170 return NULL; 170 return std::string();
achuithb 2013/05/23 22:34:47 let's split this file out of this CL.
171 } 171 }
172 Remove(GenerateId(manifest.get(), absolute_path)); 172 Remove(GenerateId(manifest.get(), absolute_path));
173 173
174 return Add(manifest.release(), absolute_path); 174 return Add(manifest.release(), absolute_path);
175 } 175 }
176 176
177 void ComponentLoader::Reload(const std::string& extension_id) { 177 void ComponentLoader::Reload(const std::string& extension_id) {
178 for (RegisteredComponentExtensions::iterator it = 178 for (RegisteredComponentExtensions::iterator it =
179 component_extensions_.begin(); it != component_extensions_.end(); 179 component_extensions_.begin(); it != component_extensions_.end();
180 ++it) { 180 ++it) {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 prefs::kEnterpriseWebStoreURL, 494 prefs::kEnterpriseWebStoreURL,
495 std::string() /* default_value */, 495 std::string() /* default_value */,
496 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 496 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
497 registry->RegisterStringPref( 497 registry->RegisterStringPref(
498 prefs::kEnterpriseWebStoreName, 498 prefs::kEnterpriseWebStoreName,
499 std::string() /* default_value */, 499 std::string() /* default_value */,
500 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 500 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
501 } 501 }
502 502
503 } // namespace extensions 503 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698