OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/common/manifest.h" | 5 #include "extensions/common/manifest.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 const std::string& path, int* out_value) const { | 200 const std::string& path, int* out_value) const { |
201 return CanAccessPath(path) && value_->GetInteger(path, out_value); | 201 return CanAccessPath(path) && value_->GetInteger(path, out_value); |
202 } | 202 } |
203 | 203 |
204 bool Manifest::GetString( | 204 bool Manifest::GetString( |
205 const std::string& path, std::string* out_value) const { | 205 const std::string& path, std::string* out_value) const { |
206 return CanAccessPath(path) && value_->GetString(path, out_value); | 206 return CanAccessPath(path) && value_->GetString(path, out_value); |
207 } | 207 } |
208 | 208 |
209 bool Manifest::GetString( | 209 bool Manifest::GetString( |
210 const std::string& path, string16* out_value) const { | 210 const std::string& path, base::string16* out_value) const { |
211 return CanAccessPath(path) && value_->GetString(path, out_value); | 211 return CanAccessPath(path) && value_->GetString(path, out_value); |
212 } | 212 } |
213 | 213 |
214 bool Manifest::GetDictionary( | 214 bool Manifest::GetDictionary( |
215 const std::string& path, const base::DictionaryValue** out_value) const { | 215 const std::string& path, const base::DictionaryValue** out_value) const { |
216 return CanAccessPath(path) && value_->GetDictionary(path, out_value); | 216 return CanAccessPath(path) && value_->GetDictionary(path, out_value); |
217 } | 217 } |
218 | 218 |
219 bool Manifest::GetList( | 219 bool Manifest::GetList( |
220 const std::string& path, const base::ListValue** out_value) const { | 220 const std::string& path, const base::ListValue** out_value) const { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 Feature* feature = FeatureProvider::GetManifestFeatures()->GetFeature(key); | 257 Feature* feature = FeatureProvider::GetManifestFeatures()->GetFeature(key); |
258 if (!feature) | 258 if (!feature) |
259 return true; | 259 return true; |
260 | 260 |
261 return feature->IsAvailableToManifest( | 261 return feature->IsAvailableToManifest( |
262 extension_id_, type_, Feature::ConvertLocation(location_), | 262 extension_id_, type_, Feature::ConvertLocation(location_), |
263 GetManifestVersion()).is_available(); | 263 GetManifestVersion()).is_available(); |
264 } | 264 } |
265 | 265 |
266 } // namespace extensions | 266 } // namespace extensions |
OLD | NEW |