diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/extension.h | 78 | ||||
-rw-r--r-- | chrome/common/extensions/extension_l10n_util.h | 11 | ||||
-rw-r--r-- | chrome/common/extensions/extension_message_bundle.h | 8 | ||||
-rw-r--r-- | chrome/common/extensions/extension_permission_set.h | 2 | ||||
-rw-r--r-- | chrome/common/extensions/extension_unpacker.h | 17 | ||||
-rw-r--r-- | chrome/common/json_pref_store.h | 17 | ||||
-rw-r--r-- | chrome/common/json_schema_validator.h | 38 | ||||
-rw-r--r-- | chrome/common/json_schema_validator_unittest_base.h | 12 | ||||
-rw-r--r-- | chrome/common/jstemplate_builder.h | 12 | ||||
-rw-r--r-- | chrome/common/net/gaia/google_service_auth_error.h | 4 | ||||
-rw-r--r-- | chrome/common/persistent_pref_store.h | 6 | ||||
-rw-r--r-- | chrome/common/pref_store.h | 4 | ||||
-rw-r--r-- | chrome/common/web_apps.h | 4 | ||||
-rw-r--r-- | chrome/common/web_resource/web_resource_unpacker.h | 6 |
14 files changed, 126 insertions, 93 deletions
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 08809aa..c1543da 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -25,15 +25,18 @@ #include "googleurl/src/gurl.h" #include "ui/gfx/size.h" -class DictionaryValue; class ExtensionAction; class ExtensionResource; class ExtensionSidebarDefaults; class FileBrowserHandler; -class ListValue; class SkBitmap; class Version; +namespace base { +class DictionaryValue; +class ListValue; +} + // Represents a Chrome extension. class Extension : public base::RefCountedThreadSafe<Extension> { public: @@ -176,18 +179,19 @@ class Extension : public base::RefCountedThreadSafe<Extension> { static scoped_refptr<Extension> Create(const FilePath& path, Location location, - const DictionaryValue& value, + const base::DictionaryValue& value, int flags, std::string* error); // In a few special circumstances, we want to create an Extension and give it // an explicit id. Most consumers should just use the plain Create() method. - static scoped_refptr<Extension> CreateWithId(const FilePath& path, - Location location, - const DictionaryValue& value, - int flags, - const std::string& explicit_id, - std::string* error); + static scoped_refptr<Extension> CreateWithId( + const FilePath& path, + Location location, + const base::DictionaryValue& value, + int flags, + const std::string& explicit_id, + std::string* error); // Return the update url used by gallery/webstore extensions. static GURL GalleryUpdateUrl(bool secure); @@ -487,7 +491,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { } const GURL& update_url() const { return update_url_; } const ExtensionIconSet& icons() const { return icons_; } - const DictionaryValue* manifest_value() const { + const base::DictionaryValue* manifest_value() const { return manifest_value_.get(); } const std::string default_locale() const { return default_locale_; } @@ -520,10 +524,10 @@ class Extension : public base::RefCountedThreadSafe<Extension> { // Theme-related. bool is_theme() const { return is_theme_; } - DictionaryValue* GetThemeImages() const { return theme_images_.get(); } - DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } - DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } - DictionaryValue* GetThemeDisplayProperties() const { + base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); } + base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } + base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } + base::DictionaryValue* GetThemeDisplayProperties() const { return theme_display_properties_.get(); } @@ -563,7 +567,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { ~Extension(); // Initialize the extension from a parsed manifest. - bool InitFromValue(const DictionaryValue& value, int flags, + bool InitFromValue(const base::DictionaryValue& value, int flags, std::string* error); // Helper function for implementing HasCachedImage/GetCachedImage. A return @@ -574,7 +578,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { // Helper method that loads a UserScript object from a // dictionary in the content_script list of the manifest. - bool LoadUserScriptHelper(const DictionaryValue* content_script, + bool LoadUserScriptHelper(const base::DictionaryValue* content_script, int definition_index, int flags, std::string* error, @@ -582,7 +586,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { // Helper method that loads either the include_globs or exclude_globs list // from an entry in the content_script lists of the manifest. - bool LoadGlobsHelper(const DictionaryValue* content_script, + bool LoadGlobsHelper(const base::DictionaryValue* content_script, int content_script_index, const char* globs_property_name, std::string* error, @@ -590,35 +594,39 @@ class Extension : public base::RefCountedThreadSafe<Extension> { UserScript *instance); // Helpers to load various chunks of the manifest. - bool LoadIsApp(const DictionaryValue* manifest, std::string* error); - bool LoadExtent(const DictionaryValue* manifest, + bool LoadIsApp(const base::DictionaryValue* manifest, std::string* error); + bool LoadExtent(const base::DictionaryValue* manifest, const char* key, URLPatternSet* extent, const char* list_error, const char* value_error, URLPattern::ParseOption parse_strictness, std::string* error); - bool LoadLaunchContainer(const DictionaryValue* manifest, std::string* error); - bool LoadLaunchURL(const DictionaryValue* manifest, std::string* error); - bool LoadAppIsolation(const DictionaryValue* manifest, std::string* error); - bool EnsureNotHybridApp(const DictionaryValue* manifest, std::string* error); + bool LoadLaunchContainer(const base::DictionaryValue* manifest, + std::string* error); + bool LoadLaunchURL(const base::DictionaryValue* manifest, + std::string* error); + bool LoadAppIsolation(const base::DictionaryValue* manifest, + std::string* error); + bool EnsureNotHybridApp(const base::DictionaryValue* manifest, + std::string* error); // Helper method to load an ExtensionAction from the page_action or // browser_action entries in the manifest. ExtensionAction* LoadExtensionActionHelper( - const DictionaryValue* extension_action, std::string* error); + const base::DictionaryValue* extension_action, std::string* error); // Helper method to load an FileBrowserHandlerList from the manifest. FileBrowserHandlerList* LoadFileBrowserHandlers( - const ListValue* extension_actions, std::string* error); + const base::ListValue* extension_actions, std::string* error); // Helper method to load an FileBrowserHandler from manifest. FileBrowserHandler* LoadFileBrowserHandler( - const DictionaryValue* file_browser_handlers, std::string* error); + const base::DictionaryValue* file_browser_handlers, std::string* error); // Helper method to load an ExtensionSidebarDefaults from the sidebar manifest // entry. ExtensionSidebarDefaults* LoadExtensionSidebarDefaults( - const DictionaryValue* sidebar, std::string* error); + const base::DictionaryValue* sidebar, std::string* error); // Returns true if the extension has more than one "UI surface". For example, // an extension that has a browser action and a page action. @@ -626,7 +634,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { // Figures out if a source contains keys not associated with themes - we // don't want to allow scripts and such to be bundled with themes. - bool ContainsNonThemeKeys(const DictionaryValue& source) const; + bool ContainsNonThemeKeys(const base::DictionaryValue& source) const; // Only allow the experimental API permission if the command line // flag is present. @@ -729,16 +737,16 @@ class Extension : public base::RefCountedThreadSafe<Extension> { std::string public_key_; // A map of resource id's to relative file paths. - scoped_ptr<DictionaryValue> theme_images_; + scoped_ptr<base::DictionaryValue> theme_images_; // A map of color names to colors. - scoped_ptr<DictionaryValue> theme_colors_; + scoped_ptr<base::DictionaryValue> theme_colors_; // A map of color names to colors. - scoped_ptr<DictionaryValue> theme_tints_; + scoped_ptr<base::DictionaryValue> theme_tints_; // A map of display properties. - scoped_ptr<DictionaryValue> theme_display_properties_; + scoped_ptr<base::DictionaryValue> theme_display_properties_; // Whether the extension is a theme. bool is_theme_; @@ -751,7 +759,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { GURL update_url_; // A copy of the manifest that this extension was created from. - scoped_ptr<DictionaryValue> manifest_value_; + scoped_ptr<base::DictionaryValue> manifest_value_; // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs // which override the handling of those URLs. (see ExtensionOverrideUI). @@ -811,13 +819,13 @@ typedef std::set<std::string> ExtensionIdSet; // Handy struct to pass core extension info around. struct ExtensionInfo { - ExtensionInfo(const DictionaryValue* manifest, + ExtensionInfo(const base::DictionaryValue* manifest, const std::string& id, const FilePath& path, Extension::Location location); ~ExtensionInfo(); - scoped_ptr<DictionaryValue> extension_manifest; + scoped_ptr<base::DictionaryValue> extension_manifest; std::string extension_id; FilePath extension_path; Extension::Location extension_location; diff --git a/chrome/common/extensions/extension_l10n_util.h b/chrome/common/extensions/extension_l10n_util.h index 57aa68f..5aee097 100644 --- a/chrome/common/extensions/extension_l10n_util.h +++ b/chrome/common/extensions/extension_l10n_util.h @@ -12,7 +12,6 @@ #include <string> #include <vector> -class DictionaryValue; class Extension; class ExtensionMessageBundle; class FilePath; @@ -20,6 +19,10 @@ class GURL; class ResourceDispatcherHostRequestInfo; struct ExtensionInfo; +namespace base { +class DictionaryValue; +} + namespace extension_l10n_util { // Set the locale for this process to a fixed value, rather than using the @@ -29,7 +32,7 @@ void SetProcessLocale(const std::string& locale); // Returns default locale in form "en-US" or "sr" or empty string if // "default_locale" section was not defined in the manifest.json file. -std::string GetDefaultLocaleFromManifest(const DictionaryValue& manifest, +std::string GetDefaultLocaleFromManifest(const base::DictionaryValue& manifest, std::string* error); // Returns true iff the extension was localized, and the current locale @@ -39,13 +42,13 @@ bool ShouldRelocalizeManifest(const ExtensionInfo& info); // Localize extension name, description, browser_action and other fields // in the manifest. bool LocalizeManifest(const ExtensionMessageBundle& messages, - DictionaryValue* manifest, + base::DictionaryValue* manifest, std::string* error); // Load message catalogs, localize manifest and attach message bundle to the // extension. bool LocalizeExtension(const FilePath& extension_path, - DictionaryValue* manifest, + base::DictionaryValue* manifest, std::string* error); // Adds locale_name to the extension if it's in chrome_locales, and diff --git a/chrome/common/extensions/extension_message_bundle.h b/chrome/common/extensions/extension_message_bundle.h index 8f3078e..fad4b84 100644 --- a/chrome/common/extensions/extension_message_bundle.h +++ b/chrome/common/extensions/extension_message_bundle.h @@ -12,14 +12,16 @@ #include "base/memory/linked_ptr.h" +namespace base { class DictionaryValue; +} // Contains localized extension messages for one locale. Any messages that the // locale does not provide are pulled from the default locale. class ExtensionMessageBundle { public: typedef std::map<std::string, std::string> SubstitutionMap; - typedef std::vector<linked_ptr<DictionaryValue> > CatalogVector; + typedef std::vector<linked_ptr<base::DictionaryValue> > CatalogVector; // JSON keys of interest for messages file. static const char* kContentKey; @@ -123,12 +125,12 @@ class ExtensionMessageBundle { // They replace all $PLACEHOLDERS$ with their value, and return just key/value // of the message. bool GetMessageValue(const std::string& key, - const DictionaryValue& catalog, + const base::DictionaryValue& catalog, std::string* value, std::string* error) const; // Get all placeholders for a given message from JSON subtree. - bool GetPlaceholders(const DictionaryValue& name_tree, + bool GetPlaceholders(const base::DictionaryValue& name_tree, const std::string& name_key, SubstitutionMap* placeholders, std::string* error) const; diff --git a/chrome/common/extensions/extension_permission_set.h b/chrome/common/extensions/extension_permission_set.h index 14f58a90..5cd331a 100644 --- a/chrome/common/extensions/extension_permission_set.h +++ b/chrome/common/extensions/extension_permission_set.h @@ -17,10 +17,8 @@ #include "base/string16.h" #include "chrome/common/extensions/url_pattern_set.h" -class DictionaryValue; class Extension; class ExtensionPrefs; -class ListValue; // When prompting the user to install or approve permissions, we display // messages describing the effects of the permissions rather than listing the diff --git a/chrome/common/extensions/extension_unpacker.h b/chrome/common/extensions/extension_unpacker.h index 0282718..2526a9e 100644 --- a/chrome/common/extensions/extension_unpacker.h +++ b/chrome/common/extensions/extension_unpacker.h @@ -13,9 +13,12 @@ #include "base/memory/scoped_ptr.h" #include "base/tuple.h" -class DictionaryValue; class SkBitmap; +namespace base { +class DictionaryValue; +} + // This class unpacks an extension. It is designed to be used in a sandboxed // child process. We unpack and parse various bits of the extension, then // report back to the browser process, who then transcodes the pre-parsed bits @@ -51,19 +54,19 @@ class ExtensionUnpacker { // |extension_path| is the path to the extension we unpacked that wrote the // data. Returns true on success. static bool ReadMessageCatalogsFromFile(const FilePath& extension_path, - DictionaryValue* catalogs); + base::DictionaryValue* catalogs); const std::string& error_message() { return error_message_; } - DictionaryValue* parsed_manifest() { + base::DictionaryValue* parsed_manifest() { return parsed_manifest_.get(); } const DecodedImages& decoded_images() { return decoded_images_; } - DictionaryValue* parsed_catalogs() { return parsed_catalogs_.get(); } + base::DictionaryValue* parsed_catalogs() { return parsed_catalogs_.get(); } private: // Parse the manifest.json file inside the extension (not in the header). // Caller takes ownership of return value. - DictionaryValue* ReadManifest(); + base::DictionaryValue* ReadManifest(); // Parse all _locales/*/messages.json files inside the extension. bool ReadAllMessageCatalogs(const std::string& default_locale); @@ -86,7 +89,7 @@ class ExtensionUnpacker { FilePath temp_install_dir_; // The parsed version of the manifest JSON contained in the extension. - scoped_ptr<DictionaryValue> parsed_manifest_; + scoped_ptr<base::DictionaryValue> parsed_manifest_; // A list of decoded images and the paths where those images came from. Paths // are relative to the manifest file. @@ -94,7 +97,7 @@ class ExtensionUnpacker { // Dictionary of relative paths and catalogs per path. Paths are in the form // of _locales/locale, without messages.json base part. - scoped_ptr<DictionaryValue> parsed_catalogs_; + scoped_ptr<base::DictionaryValue> parsed_catalogs_; // The last error message that was set. Empty if there were no errors. std::string error_message_; diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h index 8291a02..b94030d 100644 --- a/chrome/common/json_pref_store.h +++ b/chrome/common/json_pref_store.h @@ -16,12 +16,12 @@ #include "chrome/common/persistent_pref_store.h" namespace base { +class DictionaryValue; class MessageLoopProxy; +class Value; } -class DictionaryValue; class FilePath; -class Value; // A writable PrefStore implementation that is used for user preferences. class JsonPrefStore : public PersistentPrefStore, @@ -35,15 +35,16 @@ class JsonPrefStore : public PersistentPrefStore, // PrefStore overrides: virtual ReadResult GetValue(const std::string& key, - const Value** result) const; + const base::Value** result) const; virtual void AddObserver(PrefStore::Observer* observer); virtual void RemoveObserver(PrefStore::Observer* observer); virtual bool IsInitializationComplete() const; // PersistentPrefStore overrides: - virtual ReadResult GetMutableValue(const std::string& key, Value** result); - virtual void SetValue(const std::string& key, Value* value); - virtual void SetValueSilently(const std::string& key, Value* value); + virtual ReadResult GetMutableValue(const std::string& key, + base::Value** result); + virtual void SetValue(const std::string& key, base::Value* value); + virtual void SetValueSilently(const std::string& key, base::Value* value); virtual void RemoveValue(const std::string& key); virtual bool ReadOnly() const; virtual PrefReadError ReadPrefs(); @@ -57,7 +58,7 @@ class JsonPrefStore : public PersistentPrefStore, // ownership of the |value| pointer. Note, this method is used with // asynchronous file reading, so class exposes it only for the internal needs. // (read: do not call it manually). - void OnFileRead(Value* value_owned, PrefReadError error, bool no_dir); + void OnFileRead(base::Value* value_owned, PrefReadError error, bool no_dir); private: // ImportantFileWriter::DataSerializer overrides: @@ -66,7 +67,7 @@ class JsonPrefStore : public PersistentPrefStore, FilePath path_; scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy_; - scoped_ptr<DictionaryValue> prefs_; + scoped_ptr<base::DictionaryValue> prefs_; bool read_only_; diff --git a/chrome/common/json_schema_validator.h b/chrome/common/json_schema_validator.h index 68030f8..b49480b 100644 --- a/chrome/common/json_schema_validator.h +++ b/chrome/common/json_schema_validator.h @@ -11,11 +11,13 @@ #include "base/basictypes.h" +namespace base { class DictionaryValue; class FundamentalValue; class ListValue; class StringValue; class Value; +} //============================================================================== // This class implements a subset of JSON Schema. @@ -85,7 +87,7 @@ class JSONSchemaValidator { static const char kInvalidType[]; // Classifies a Value as one of the JSON schema primitive types. - static std::string GetJSONSchemaType(Value* value); + static std::string GetJSONSchemaType(base::Value* value); // Utility methods to format error messages. The first method can have one // wildcard represented by '*', which is replaced with s1. The second method @@ -101,7 +103,7 @@ class JSONSchemaValidator { // NOTE: This constructor assumes that |schema| is well formed and valid. // Errors will result in CHECK at runtime; this constructor should not be used // with untrusted schemas. - explicit JSONSchemaValidator(DictionaryValue* schema); + explicit JSONSchemaValidator(base::DictionaryValue* schema); // Creates a validator for the specified schema and user-defined types. Each // type must be a valid JSONSchema type description with an additional "id" @@ -111,7 +113,7 @@ class JSONSchemaValidator { // NOTE: This constructor assumes that |schema| and |types| are well-formed // and valid. Errors will result in CHECK at runtime; this constructor should // not be used with untrusted schemas. - JSONSchemaValidator(DictionaryValue* schema, ListValue* types); + JSONSchemaValidator(base::DictionaryValue* schema, base::ListValue* types); ~JSONSchemaValidator(); @@ -139,10 +141,10 @@ class JSONSchemaValidator { // Validates a JSON value. Returns true if the instance is valid, false // otherwise. If false is returned any errors are available from the errors() // getter. - bool Validate(Value* instance); + bool Validate(base::Value* instance); private: - typedef std::map<std::string, DictionaryValue*> TypeMap; + typedef std::map<std::string, base::DictionaryValue*> TypeMap; // Each of the below methods handle a subset of the validation process. The // path paramater is the path to |instance| from the root of the instance tree @@ -151,50 +153,54 @@ class JSONSchemaValidator { // Validates any instance node against any schema node. This is called for // every node in the instance tree, and it just decides which of the more // detailed methods to call. - void Validate(Value* instance, DictionaryValue* schema, + void Validate(base::Value* instance, base::DictionaryValue* schema, const std::string& path); // Validates a node against a list of possible schemas. If any one of the // schemas match, the node is valid. - void ValidateChoices(Value* instance, ListValue* choices, + void ValidateChoices(base::Value* instance, base::ListValue* choices, const std::string& path); // Validates a node against a list of exact primitive values, eg 42, "foobar". - void ValidateEnum(Value* instance, ListValue* choices, + void ValidateEnum(base::Value* instance, base::ListValue* choices, const std::string& path); // Validates a JSON object against an object schema node. - void ValidateObject(DictionaryValue* instance, DictionaryValue* schema, + void ValidateObject(base::DictionaryValue* instance, + base::DictionaryValue* schema, const std::string& path); // Validates a JSON array against an array schema node. - void ValidateArray(ListValue* instance, DictionaryValue* schema, + void ValidateArray(base::ListValue* instance, base::DictionaryValue* schema, const std::string& path); // Validates a JSON array against an array schema node configured to be a // tuple. In a tuple, there is one schema node for each item expected in the // array. - void ValidateTuple(ListValue* instance, DictionaryValue* schema, + void ValidateTuple(base::ListValue* instance, base::DictionaryValue* schema, const std::string& path); // Validate a JSON string against a string schema node. - void ValidateString(StringValue* instance, DictionaryValue* schema, + void ValidateString(base::StringValue* instance, + base::DictionaryValue* schema, const std::string& path); // Validate a JSON number against a number schema node. - void ValidateNumber(Value* instance, DictionaryValue* schema, + void ValidateNumber(base::Value* instance, + base::DictionaryValue* schema, const std::string& path); // Validates that the JSON node |instance| has |expected_type|. - bool ValidateType(Value* instance, const std::string& expected_type, + bool ValidateType(base::Value* instance, const std::string& expected_type, const std::string& path); // Returns true if |schema| will allow additional items of any type. bool SchemaAllowsAnyAdditionalItems( - DictionaryValue* schema, DictionaryValue** addition_items_schema); + base::DictionaryValue* schema, + base::DictionaryValue** addition_items_schema); // The root schema node. - DictionaryValue* schema_root_; + base::DictionaryValue* schema_root_; // Map of user-defined name to type. TypeMap types_; diff --git a/chrome/common/json_schema_validator_unittest_base.h b/chrome/common/json_schema_validator_unittest_base.h index 8530a13..6208489 100644 --- a/chrome/common/json_schema_validator_unittest_base.h +++ b/chrome/common/json_schema_validator_unittest_base.h @@ -7,9 +7,11 @@ #include "testing/gtest/include/gtest/gtest.h" +namespace base { class DictionaryValue; class ListValue; class Value; +} // Base class for unit tests for JSONSchemaValidator. There is currently only // one implementation, JSONSchemaValidatorCPPTest. @@ -29,12 +31,14 @@ class JSONSchemaValidatorTestBase : public testing::Test { protected: virtual void ExpectValid(const std::string& test_source, - Value* instance, DictionaryValue* schema, - ListValue* types) = 0; + base::Value* instance, + base::DictionaryValue* schema, + base::ListValue* types) = 0; virtual void ExpectNotValid(const std::string& test_source, - Value* instance, DictionaryValue* schema, - ListValue* types, + base::Value* instance, + base::DictionaryValue* schema, + base::ListValue* types, const std::string& expected_error_path, const std::string& expected_error_message) = 0; diff --git a/chrome/common/jstemplate_builder.h b/chrome/common/jstemplate_builder.h index 0c4fcf8..ae4563b 100644 --- a/chrome/common/jstemplate_builder.h +++ b/chrome/common/jstemplate_builder.h @@ -16,8 +16,8 @@ #include <string> -class DictionaryValue; namespace base { +class DictionaryValue; class StringPiece; } @@ -27,20 +27,20 @@ namespace jstemplate_builder { // string includes the HTML and the javascript code necessary to generate the // full page with support for JsTemplates. std::string GetTemplateHtml(const base::StringPiece& html_template, - const DictionaryValue* json, + const base::DictionaryValue* json, const base::StringPiece& template_id); // A helper function that generates a string of HTML to be loaded. The // string includes the HTML and the javascript code necessary to generate the // full page with support for i18n Templates. std::string GetI18nTemplateHtml(const base::StringPiece& html_template, - const DictionaryValue* json); + const base::DictionaryValue* json); // A helper function that generates a string of HTML to be loaded. The // string includes the HTML and the javascript code necessary to generate the // full page with support for both i18n Templates and JsTemplates. std::string GetTemplatesHtml(const base::StringPiece& html_template, - const DictionaryValue* json, + const base::DictionaryValue* json, const base::StringPiece& template_id); // The following functions build up the different parts that the above @@ -48,11 +48,11 @@ std::string GetTemplatesHtml(const base::StringPiece& html_template, // Appends a script tag with a variable name |templateData| that has the JSON // assigned to it. -void AppendJsonHtml(const DictionaryValue* json, std::string* output); +void AppendJsonHtml(const base::DictionaryValue* json, std::string* output); // Same as AppendJsonHtml(), execpt does not include the <script></script> // tag wrappers. -void AppendJsonJS(const DictionaryValue* json, std::string* output); +void AppendJsonJS(const base::DictionaryValue* json, std::string* output); // Appends the source for JsTemplates in a script tag. void AppendJsTemplateSourceHtml(std::string* output); diff --git a/chrome/common/net/gaia/google_service_auth_error.h b/chrome/common/net/gaia/google_service_auth_error.h index 747df44..74cc11d 100644 --- a/chrome/common/net/gaia/google_service_auth_error.h +++ b/chrome/common/net/gaia/google_service_auth_error.h @@ -27,7 +27,9 @@ #include "googleurl/src/gurl.h" +namespace base { class DictionaryValue; +} class GoogleServiceAuthError { public: @@ -114,7 +116,7 @@ class GoogleServiceAuthError { // Returns info about this object in a dictionary. Caller takes // ownership of returned dictionary. - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; private: GoogleServiceAuthError(State s, int error); diff --git a/chrome/common/persistent_pref_store.h b/chrome/common/persistent_pref_store.h index 0f007c5..b209716 100644 --- a/chrome/common/persistent_pref_store.h +++ b/chrome/common/persistent_pref_store.h @@ -43,7 +43,7 @@ class PersistentPrefStore : public PrefStore { // Equivalent to PrefStore::GetValue but returns a mutable value. virtual ReadResult GetMutableValue(const std::string& key, - Value** result) = 0; + base::Value** result) = 0; // Triggers a value changed notification. This function needs to be called // if one retrieves a list or dictionary with GetMutableValue and change its @@ -53,13 +53,13 @@ class PersistentPrefStore : public PrefStore { // Sets a |value| for |key| in the store. Assumes ownership of |value|, which // must be non-NULL. - virtual void SetValue(const std::string& key, Value* value) = 0; + virtual void SetValue(const std::string& key, base::Value* value) = 0; // Same as SetValue, but doesn't generate notifications. This is used by // PrefService::GetMutableUserPref() in order to put empty entries // into the user pref store. Using SetValue is not an option since existing // tests rely on the number of notifications generated. - virtual void SetValueSilently(const std::string& key, Value* value) = 0; + virtual void SetValueSilently(const std::string& key, base::Value* value) = 0; // Removes the value for |key|. virtual void RemoveValue(const std::string& key) = 0; diff --git a/chrome/common/pref_store.h b/chrome/common/pref_store.h index eec74e9..bc74af1 100644 --- a/chrome/common/pref_store.h +++ b/chrome/common/pref_store.h @@ -11,7 +11,9 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" +namespace base { class Value; +} // This is an abstract interface for reading and writing from/to a persistent // preference store, used by PrefService. An implementation using a JSON file @@ -56,7 +58,7 @@ class PrefStore : public base::RefCounted<PrefStore> { // |result| is only modified if the return value is READ_OK. Ownership of the // |result| value remains with the PrefStore. virtual ReadResult GetValue(const std::string& key, - const Value** result) const = 0; + const base::Value** result) const = 0; protected: friend class base::RefCounted<PrefStore>; diff --git a/chrome/common/web_apps.h b/chrome/common/web_apps.h index 7e7c9cb..4bc5d0a 100644 --- a/chrome/common/web_apps.h +++ b/chrome/common/web_apps.h @@ -19,7 +19,9 @@ class WebDocument; class WebFrame; } +namespace base { class Value; +} // Structure used when installing a web page as an app. struct WebApplicationInfo { @@ -100,7 +102,7 @@ bool ParseWebAppFromWebDocument(WebKit::WebFrame* frame, // Parses |web_app| information out of |definition|. Returns true on success, or // false and |error| on failure. This function assumes that |web_app| has a // valid manifest_url. -bool ParseWebAppFromDefinitionFile(Value* definition, +bool ParseWebAppFromDefinitionFile(base::Value* definition, WebApplicationInfo* web_app, string16* error); diff --git a/chrome/common/web_resource/web_resource_unpacker.h b/chrome/common/web_resource/web_resource_unpacker.h index d438826..4927c64 100644 --- a/chrome/common/web_resource/web_resource_unpacker.h +++ b/chrome/common/web_resource/web_resource_unpacker.h @@ -18,7 +18,9 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +namespace base { class DictionaryValue; +} class WebResourceUnpacker { public: @@ -36,7 +38,7 @@ class WebResourceUnpacker { const std::string& error_message() { return error_message_; } // Gets data which has been parsed by Run(). - DictionaryValue* parsed_json() { + base::DictionaryValue* parsed_json() { return parsed_json_.get(); } @@ -45,7 +47,7 @@ class WebResourceUnpacker { std::string resource_data_; // Holds the result of JSON parsing of resource_data_. - scoped_ptr<DictionaryValue> parsed_json_; + scoped_ptr<base::DictionaryValue> parsed_json_; // Holds the last error message produced by Run(). std::string error_message_; |