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

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

Issue 8659002: Adding the --load-component-extension flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding comment to ScopedAllowIO.wq Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_prefs.h" 5 #include "chrome/browser/extensions/extension_prefs.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_pref_store.h" 10 #include "chrome/browser/extensions/extension_pref_store.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (extension_dict->GetInteger(kPrefLocation, &location_value) && 342 if (extension_dict->GetInteger(kPrefLocation, &location_value) &&
343 location_value == Extension::LOAD) { 343 location_value == Extension::LOAD) {
344 // Unpacked extensions will already have absolute paths. 344 // Unpacked extensions will already have absolute paths.
345 continue; 345 continue;
346 } 346 }
347 347
348 FilePath::StringType path_string; 348 FilePath::StringType path_string;
349 if (!extension_dict->GetString(kPrefPath, &path_string)) 349 if (!extension_dict->GetString(kPrefPath, &path_string))
350 continue; 350 continue;
351 351
352 DCHECK(!FilePath(path_string).IsAbsolute()); 352 DCHECK(location_value == Extension::COMPONENT ||
353 !FilePath(path_string).IsAbsolute());
353 extension_dict->SetString( 354 extension_dict->SetString(
354 kPrefPath, install_directory_.Append(path_string).value()); 355 kPrefPath, install_directory_.Append(path_string).value());
355 } 356 }
356 } 357 }
357 358
358 DictionaryValue* ExtensionPrefs::CopyCurrentExtensions() { 359 DictionaryValue* ExtensionPrefs::CopyCurrentExtensions() {
359 const DictionaryValue* extensions = prefs_->GetDictionary(kExtensionsPref); 360 const DictionaryValue* extensions = prefs_->GetDictionary(kExtensionsPref);
360 if (extensions) { 361 if (extensions) {
361 DictionaryValue* copy = extensions->DeepCopy(); 362 DictionaryValue* copy = extensions->DeepCopy();
362 MakePathsAbsolute(copy); 363 MakePathsAbsolute(copy);
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 prefs->RegisterListPref(prefs::kExtensionInstallAllowList, 1830 prefs->RegisterListPref(prefs::kExtensionInstallAllowList,
1830 PrefService::UNSYNCABLE_PREF); 1831 PrefService::UNSYNCABLE_PREF);
1831 prefs->RegisterListPref(prefs::kExtensionInstallDenyList, 1832 prefs->RegisterListPref(prefs::kExtensionInstallDenyList,
1832 PrefService::UNSYNCABLE_PREF); 1833 PrefService::UNSYNCABLE_PREF);
1833 prefs->RegisterListPref(prefs::kExtensionInstallForceList, 1834 prefs->RegisterListPref(prefs::kExtensionInstallForceList,
1834 PrefService::UNSYNCABLE_PREF); 1835 PrefService::UNSYNCABLE_PREF);
1835 prefs->RegisterStringPref(kWebStoreLogin, 1836 prefs->RegisterStringPref(kWebStoreLogin,
1836 std::string() /* default_value */, 1837 std::string() /* default_value */,
1837 PrefService::UNSYNCABLE_PREF); 1838 PrefService::UNSYNCABLE_PREF);
1838 } 1839 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_file_browser_private_api.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698