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

Unified Diff: chrome/common/extensions/manifest.cc

Issue 12253022: Manifest handler for all keys background-related. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/manifest.cc
diff --git a/chrome/common/extensions/manifest.cc b/chrome/common/extensions/manifest.cc
index 2ca07a23b9247ba79254507d68ed049dcab12dc6..31ff8629c20f6d4b7f1a1620c3983c23ac1f8c50 100644
--- a/chrome/common/extensions/manifest.cc
+++ b/chrome/common/extensions/manifest.cc
@@ -95,7 +95,7 @@ Manifest::Location Manifest::GetHigherPriorityLocation(
return (loc1_rank > loc2_rank ? loc1 : loc2 );
}
-Manifest::Manifest(Location location, scoped_ptr<DictionaryValue> value)
+Manifest::Manifest(Location location, scoped_ptr<base::DictionaryValue> value)
: location_(location),
value_(value.Pass()),
type_(TYPE_UNKNOWN) {
@@ -153,7 +153,7 @@ void Manifest::ValidateManifest(
}
// Also generate warnings for keys that are not features.
- for (DictionaryValue::key_iterator key = value_->begin_keys();
+ for (base::DictionaryValue::key_iterator key = value_->begin_keys();
key != value_->end_keys(); ++key) {
if (!BaseFeatureProvider::GetManifestFeatures()->GetFeature(*key)) {
warnings->push_back(InstallWarning(
@@ -169,12 +169,12 @@ bool Manifest::HasKey(const std::string& key) const {
}
bool Manifest::HasPath(const std::string& path) const {
- Value* ignored = NULL;
+ base::Value* ignored = NULL;
return CanAccessPath(path) && value_->Get(path, &ignored);
}
bool Manifest::Get(
- const std::string& path, Value** out_value) const {
+ const std::string& path, const base::Value** out_value) const {
return CanAccessPath(path) && value_->Get(path, out_value);
}
@@ -199,28 +199,18 @@ bool Manifest::GetString(
}
bool Manifest::GetDictionary(
- const std::string& path, const DictionaryValue** out_value) const {
- return GetDictionary(path, const_cast<DictionaryValue**>(out_value));
-}
-
-bool Manifest::GetDictionary(
- const std::string& path, DictionaryValue** out_value) const {
+ const std::string& path, const base::DictionaryValue** out_value) const {
return CanAccessPath(path) && value_->GetDictionary(path, out_value);
}
bool Manifest::GetList(
- const std::string& path, const ListValue** out_value) const {
- return GetList(path, const_cast<ListValue**>(out_value));
-}
-
-bool Manifest::GetList(
- const std::string& path, ListValue** out_value) const {
+ const std::string& path, const base::ListValue** out_value) const {
return CanAccessPath(path) && value_->GetList(path, out_value);
}
Manifest* Manifest::DeepCopy() const {
Manifest* manifest = new Manifest(
- location_, scoped_ptr<DictionaryValue>(value_->DeepCopy()));
+ location_, scoped_ptr<base::DictionaryValue>(value_->DeepCopy()));
manifest->set_extension_id(extension_id_);
return manifest;
}

Powered by Google App Engine
This is Rietveld 408576698