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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return Add(manifest_contents, root_directory); 130 return Add(manifest_contents, root_directory);
131 } 131 }
132 132
133 std::string ComponentLoader::Add(const std::string& manifest_contents, 133 std::string ComponentLoader::Add(const std::string& manifest_contents,
134 const base::FilePath& root_directory) { 134 const base::FilePath& root_directory) {
135 // The Value is kept for the lifetime of the ComponentLoader. This is 135 // The Value is kept for the lifetime of the ComponentLoader. This is
136 // required in case LoadAll() is called again. 136 // required in case LoadAll() is called again.
137 DictionaryValue* manifest = ParseManifest(manifest_contents); 137 DictionaryValue* manifest = ParseManifest(manifest_contents);
138 if (manifest) 138 if (manifest)
139 return Add(manifest, root_directory); 139 return Add(manifest, root_directory);
140 return ""; 140 return std::string();
141 } 141 }
142 142
143 std::string ComponentLoader::Add(const DictionaryValue* parsed_manifest, 143 std::string ComponentLoader::Add(const DictionaryValue* parsed_manifest,
144 const base::FilePath& root_directory) { 144 const base::FilePath& root_directory) {
145 ComponentExtensionInfo info(parsed_manifest, root_directory); 145 ComponentExtensionInfo info(parsed_manifest, root_directory);
146 component_extensions_.push_back(info); 146 component_extensions_.push_back(info);
147 if (extension_service_->is_ready()) 147 if (extension_service_->is_ready())
148 Load(info); 148 Load(info);
149 return info.extension_id; 149 return info.extension_id;
150 } 150 }
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 void ComponentLoader::RegisterUserPrefs(PrefRegistrySyncable* registry) { 476 void ComponentLoader::RegisterUserPrefs(PrefRegistrySyncable* registry) {
477 registry->RegisterStringPref(prefs::kEnterpriseWebStoreURL, 477 registry->RegisterStringPref(prefs::kEnterpriseWebStoreURL,
478 std::string() /* default_value */, 478 std::string() /* default_value */,
479 PrefRegistrySyncable::UNSYNCABLE_PREF); 479 PrefRegistrySyncable::UNSYNCABLE_PREF);
480 registry->RegisterStringPref(prefs::kEnterpriseWebStoreName, 480 registry->RegisterStringPref(prefs::kEnterpriseWebStoreName,
481 std::string() /* default_value */, 481 std::string() /* default_value */,
482 PrefRegistrySyncable::UNSYNCABLE_PREF); 482 PrefRegistrySyncable::UNSYNCABLE_PREF);
483 } 483 }
484 484
485 } // namespace extensions 485 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/bundle_installer.cc ('k') | chrome/browser/extensions/component_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698