0

Move base/values.h into the base namespace. This includes a cros DEPS roll

with a minor change to that code since libcros also uses base/values.h.

BUG=88666
TEST=none
Review URL: http://codereview.chromium.org/7259019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92208 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
dmazzoni@chromium.org
2011-07-12 19:15:03 +00:00
parent 2338319a9a
commit f3a1c64a4d
281 changed files with 1798 additions and 1265 deletions
base
chrome
browser
about_flags.haccessibility_events.h
autocomplete
automation
background
bookmarks
chromeos
content_settings
download
enumerate_modules_model_win.h
extensions
external_protocol
geolocation
history
importer
io_thread.h
metrics
net
notifications
plugin_updater.h
policy
prefs
prerender
printing
profiles
safe_browsing
ssl
sync
themes
translate
ui
web_resource
common
installer
profile_import
renderer
service
test
content
ipc
net
printing
remoting/host
tools/cros.DEPS
webkit/plugins/npapi

@ -43,10 +43,10 @@
#define FRIEND_TEST(test_case_name, test_name)\
friend class test_case_name##_##test_name##_Test
class Value;
namespace base {
class Value;
class BASE_API JSONReader {
public:
// A struct to hold a JS token.

@ -11,10 +11,10 @@
#include "base/base_api.h"
#include "base/basictypes.h"
class Value;
namespace base {
class Value;
class BASE_API JSONWriter {
public:
// Given a root node, generates a JSON string and puts it into |json|.

@ -11,11 +11,12 @@
#include "base/base_api.h"
class FilePath;
class StringValue;
class Value;
namespace base {
class StringValue;
class Value;
// The caller takes ownership of the returned value.
BASE_API StringValue* CreateFilePathValue(const FilePath& in_value);
BASE_API bool GetValueAsFilePath(const Value& value, FilePath* file_path);

@ -32,6 +32,13 @@
#include "base/string16.h"
#include "build/build_config.h"
// This file declares "using base::Value", etc. at the bottom, so that
// current code can use these classes without the base namespace. In
// new code, please always use base::Value, etc. or add your own
// "using" declaration.
// http://crbug.com/88666
namespace base {
class BinaryValue;
class DictionaryValue;
class FundamentalValue;
@ -455,4 +462,17 @@ class BASE_API ValueSerializer {
virtual Value* Deserialize(int* error_code, std::string* error_str) = 0;
};
} // namespace base
// http://crbug.com/88666
using base::BinaryValue;
using base::DictionaryValue;
using base::FundamentalValue;
using base::ListValue;
using base::StringValue;
using base::Value;
using base::ValueMap;
using base::ValueSerializer;
using base::ValueVector;
#endif // BASE_VALUES_H_

@ -11,9 +11,12 @@
#include "base/command_line.h"
class ListValue;
class PrefService;
namespace base {
class ListValue;
}
namespace about_flags {
// Enumeration of OSs.
@ -87,7 +90,7 @@ struct Experiment {
void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
// Get a list of all available experiments. The caller owns the result.
ListValue* GetFlagsExperimentsData(PrefService* prefs);
base::ListValue* GetFlagsExperimentsData(PrefService* prefs);
// Returns true if one of the experiment flags has been flipped since startup.
bool IsRestartNeededToCommitChanges();

@ -9,9 +9,12 @@
#include <string>
class AccessibilityControlInfo;
class DictionaryValue;
class Profile;
namespace base {
class DictionaryValue;
}
// Use the NotificationService to post the given accessibility
// notification type with AccessibilityControlInfo details to any
// listeners. Will not send if the profile's pause level is nonzero
@ -27,7 +30,7 @@ class AccessibilityControlInfo {
// Serialize this class as a DictionaryValue that can be converted to
// a JavaScript object.
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
// Return the specific type of this control, which will be one of the
// string constants defined in extension_accessibility_api_constants.h.
@ -86,7 +89,7 @@ class AccessibilityRadioButtonInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
void SetChecked(bool checked) { checked_ = checked; }
@ -111,7 +114,7 @@ class AccessibilityCheckboxInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
void SetChecked(bool checked) { checked_ = checked; }
@ -132,7 +135,7 @@ class AccessibilityTabInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
void SetTab(int tab_index, std::string tab_name) {
tab_index_ = tab_index;
@ -160,7 +163,7 @@ class AccessibilityComboBoxInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
void SetValue(int item_index, const std::string& value) {
item_index_ = item_index;
@ -190,7 +193,7 @@ class AccessibilityTextBoxInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
void SetValue(
const std::string& value, int selection_start, int selection_end) {
@ -223,7 +226,7 @@ class AccessibilityListBoxInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
void SetValue(int item_index, std::string value) {
item_index_ = item_index;
@ -264,7 +267,7 @@ class AccessibilityMenuItemInfo : public AccessibilityControlInfo {
virtual const char* type() const;
virtual void SerializeToDict(DictionaryValue* dict) const;
virtual void SerializeToDict(base::DictionaryValue* dict) const;
int item_index() const { return item_index_; }
int item_count() const { return item_count_; }

@ -29,7 +29,10 @@
#include "content/common/url_fetcher.h"
class Profile;
namespace base {
class Value;
}
// Autocomplete provider for searches and suggestions from a search engine.
//
@ -199,7 +202,7 @@ class SearchProvider : public AutocompleteProvider,
// Parses the results from the Suggest server and stores up to kMaxMatches of
// them in server_results_. Returns whether parsing succeeded.
bool ParseSuggestResults(Value* root_val,
bool ParseSuggestResults(base::Value* root_val,
bool is_keyword,
const string16& input_text,
SuggestResults* suggest_results);

@ -55,7 +55,6 @@ class AutomationTabTracker;
class AutomationWindowTracker;
class Browser;
class CreditCard;
class DictionaryValue;
class DownloadItem;
class Extension;
class ExtensionPortContainer;
@ -63,7 +62,6 @@ class ExtensionTestResultNotificationObserver;
class ExternalTabContainer;
class FilePath;
class InitialLoadObserver;
class ListValue;
class LoginHandler;
class MetricEventDurationObserver;
class NavigationController;
@ -73,6 +71,10 @@ class RenderViewHost;
class TabContents;
struct AutocompleteMatchData;
namespace base {
class DictionaryValue;
}
namespace gfx {
class Point;
}
@ -149,7 +151,8 @@ class AutomationProvider
// Get the DictionaryValue equivalent for a download item. Caller owns the
// DictionaryValue.
DictionaryValue* GetDictionaryFromDownloadItem(const DownloadItem* download);
base::DictionaryValue* GetDictionaryFromDownloadItem(
const DownloadItem* download);
protected:
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;

@ -14,9 +14,12 @@
class AutomationProvider;
class Browser;
class DictionaryValue;
class TabContents;
namespace base {
class DictionaryValue;
class Value;
}
namespace IPC {
class Message;
@ -35,7 +38,7 @@ class AutomationJSONReply {
// Send a success reply along with data contained in |value|.
// An empty message will be sent if |value| is NULL.
void SendSuccess(const Value* value);
void SendSuccess(const base::Value* value);
// Send an error reply along with error message |error_message|.
void SendError(const std::string& error_message);
@ -48,7 +51,7 @@ class AutomationJSONReply {
// Gets the browser specified by the given dictionary |args|. |args| should
// contain a key 'windex' which refers to the index of the browser. Returns
// true on success and sets |browser|. Otherwise, |error| will be set.
bool GetBrowserFromJSONArgs(DictionaryValue* args,
bool GetBrowserFromJSONArgs(base::DictionaryValue* args,
Browser** browser,
std::string* error) WARN_UNUSED_RESULT;
@ -56,7 +59,7 @@ bool GetBrowserFromJSONArgs(DictionaryValue* args,
// contain a key 'windex' which refers to the index of the parent browser,
// and a key 'tab_index' which refers to the index of the tab in that browser.
// Returns true on success and sets |tab|. Otherwise, |error| will be set.
bool GetTabFromJSONArgs(DictionaryValue* args,
bool GetTabFromJSONArgs(base::DictionaryValue* args,
TabContents** tab,
std::string* error) WARN_UNUSED_RESULT;
@ -65,7 +68,7 @@ bool GetTabFromJSONArgs(DictionaryValue* args,
// a key 'tab_index' which refers to the index of the tab in that browser.
// Returns true on success and sets |browser| and |tab|. Otherwise, |error|
// will be set.
bool GetBrowserAndTabFromJSONArgs(DictionaryValue* args,
bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args,
Browser** browser,
TabContents** tab,
std::string* error) WARN_UNUSED_RESULT;

@ -84,7 +84,7 @@ class InitialLoadObserver : public NotificationObserver {
// stop_time_ms values may be null if WaitForInitialLoads has not finished.
// Only includes entries for the |tab_count| tabs we are monitoring.
// There is no defined ordering of the return value.
DictionaryValue* GetTimingInformation() const;
base::DictionaryValue* GetTimingInformation() const;
private:
class TabTime;
@ -1250,7 +1250,7 @@ class NTPInfoObserver : public NotificationObserver {
scoped_ptr<IPC::Message> reply_message_;
CancelableRequestConsumer* consumer_;
CancelableRequestProvider::Handle request_;
scoped_ptr<DictionaryValue> ntp_info_;
scoped_ptr<base::DictionaryValue> ntp_info_;
history::TopSites* top_sites_;
NotificationRegistrar registrar_;

@ -12,10 +12,13 @@
class AutomationProvider;
class Browser;
class DictionaryValue;
class GURL;
class TabContents;
namespace base {
class DictionaryValue;
}
namespace IPC {
class Message;
}
@ -54,19 +57,19 @@ void DeleteCookie(const GURL& url,
// Gets the cookies for the given URL. Uses the JSON interface.
// See |TestingAutomationProvider| for example input.
void GetCookiesJSON(AutomationProvider* provider,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Deletes the cookie with the given name for the URL. Uses the JSON interface.
// See |TestingAutomationProvider| for example input.
void DeleteCookieJSON(AutomationProvider* provider,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Sets a cookie for the given URL. Uses the JSON interface.
// See |TestingAutomationProvider| for example input.
void SetCookieJSON(AutomationProvider* provider,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
} // namespace automation_util

@ -21,9 +21,12 @@
#include "content/common/page_type.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
class DictionaryValue;
class TemplateURLService;
namespace base {
class DictionaryValue;
}
// This is an automation provider containing testing calls.
class TestingAutomationProvider : public AutomationProvider,
public BrowserList::Observer,
@ -351,20 +354,20 @@ class TestingAutomationProvider : public AutomationProvider,
// Method ptr for json handlers.
// Uses the JSON interface for input/output.
typedef void (TestingAutomationProvider::*JsonHandler)(DictionaryValue*,
typedef void (TestingAutomationProvider::*JsonHandler)(base::DictionaryValue*,
IPC::Message*);
// Method ptr for json handlers that take a browser argument.
// Uses the JSON interface for input/output.
typedef void (TestingAutomationProvider::*BrowserJsonHandler)(
Browser* browser,
DictionaryValue*,
base::DictionaryValue*,
IPC::Message*);
// Set window dimensions.
// Uses the JSON interface for input/output.
void SetWindowDimensions(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about infobars in the given TabContents object.
@ -376,103 +379,103 @@ class TestingAutomationProvider : public AutomationProvider,
// Perform actions on an infobar like dismiss, accept, cancel.
// Uses the JSON interface for input/output.
void PerformActionOnInfobar(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about the chromium/chrome in use.
// This includes things like version, executable name, executable path.
// Uses the JSON interface for input/output.
void GetBrowserInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about the state of navigation in a given tab.
// This includes ssl info.
// Uses the JSON interface for input/output.
void GetNavigationInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about downloads. This includes only ones that have been
// registered by the history system.
// Uses the JSON interface for input/output.
void GetDownloadsInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Wait for all downloads to complete.
// Uses the JSON interface for input/output.
void WaitForDownloadsToComplete(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Performs the given action on the specified download.
// Uses the JSON interface for input/output.
void PerformActionOnDownload(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about history.
// Uses the JSON interface for input/output.
void GetHistoryInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Add an item to the history service.
// Uses the JSON interface for input/output.
void AddHistoryItem(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Invoke loading of template url model.
// Uses the JSON interface for input/output.
void LoadSearchEngineInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get search engines list.
// Assumes that the profile's template url model is loaded.
// Uses the JSON interface for input/output.
void GetSearchEngineInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Add or edit search engine.
// Assumes that the profile's template url model is loaded.
// Uses the JSON interface for input/output.
void AddOrEditSearchEngine(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Perform a given action on an existing search engine.
// Assumes that the profile's template url model is loaded.
// Uses the JSON interface for input/output.
void PerformActionOnSearchEngine(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about preferences stored in Local State.
// Uses the JSON interface for input/output.
void GetLocalStatePrefsInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Set local state prefs.
// Uses the JSON interface for input/output.
void SetLocalStatePrefs(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about preferences.
// Uses the JSON interface for input/output.
void GetPrefsInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Set prefs.
// Uses the JSON interface for input/output.
void SetPrefs(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Return load times of initial tabs.
@ -481,25 +484,25 @@ class TestingAutomationProvider : public AutomationProvider,
// See declaration of InitialLoadObserver in automation_provider_observers.h
// for example response.
void GetInitialLoadTimes(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about plugins.
// Uses the JSON interface for input/output.
void GetPluginsInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Enable a plugin.
// Uses the JSON interface for input/output.
void EnablePlugin(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Disable a plugin.
// Uses the JSON interface for input/output.
void DisablePlugin(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about omnibox.
@ -507,19 +510,19 @@ class TestingAutomationProvider : public AutomationProvider,
// in the omnibox popup, the text in the omnibox.
// Uses the JSON interface for input/output.
void GetOmniboxInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Set text in the omnibox. This sets focus to the omnibox.
// Uses the JSON interface for input/output.
void SetOmniboxText(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Move omnibox popup selection up or down.
// Uses the JSON interface for input/output.
void OmniboxMovePopupSelection(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Accept the current string of text in the omnibox.
@ -527,25 +530,25 @@ class TestingAutomationProvider : public AutomationProvider,
// Blocks until the page loads.
// Uses the JSON interface for input/output.
void OmniboxAcceptInput(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Generate dictionary info about instant tab.
// Uses the JSON interface for input/output.
void GetInstantInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Save the contents of a tab into a file.
// Uses the JSON interface for input/output.
void SaveTabContents(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Import the given settings from the given browser.
// Uses the JSON interface for input/output.
void ImportSettings(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Add a new entry to the password store based on the password information
@ -553,57 +556,57 @@ class TestingAutomationProvider : public AutomationProvider,
// will never fill in the password).
// Uses the JSON interface for input/output.
void AddSavedPassword(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Removes the password matching the information provided. This method can
// also be used to remove a blacklisted site.
// Uses the JSON interface for input/output.
void RemoveSavedPassword(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Return the saved username/password combinations.
// Uses the JSON interface for input/output.
void GetSavedPasswords(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Clear the specified browsing data. This call provides similar
// functionality to RemoveBrowsingData but is synchronous.
// Uses the JSON interface for input/output.
void ClearBrowsingData(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about blocked popups in a tab.
// Uses the JSON interface for input/output.
void GetBlockedPopupsInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Launch a blocked popup.
// Uses the JSON interface for input/output.
void UnblockAndLaunchBlockedPopup(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about theme.
// Uses the JSON interface for input/output.
void GetThemeInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get info about all intalled extensions.
// Uses the JSON interface for input/output.
void GetExtensionsInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Uninstalls the extension with the given id.
// Uses the JSON interface for input/output.
void UninstallExtensionById(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Set extension states:
@ -611,42 +614,42 @@ class TestingAutomationProvider : public AutomationProvider,
// Allow/disallow extension in incognito mode.
// Uses the JSON interface for input/output.
void SetExtensionStateById(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Responds to the Find request and returns the match count.
void FindInPage(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Returns information about translation for a given tab. Includes
// information about the translate bar if it is showing.
void GetTranslateInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Takes the specified action on the translate bar.
// Uses the JSON interface for input/output.
void SelectTranslateOption(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Get the profiles that are currently saved to the DB.
// Uses the JSON interface for input/output.
void GetAutofillProfile(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Fill in an AutofillProfile with the given profile information.
// Uses the JSON interface for input/output.
void FillAutofillProfile(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Causes the autofill popup to be displayed in an already-focused webpage
// form field. Waits until the popup is displayed before returning.
void AutofillTriggerSuggestions(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* message);
// Highlights the previous or next autofill entry in an already-displayed
@ -655,7 +658,7 @@ class TestingAutomationProvider : public AutomationProvider,
// to be displayed in the webpage form before returning. Use
// AutofillTriggerSuggestions() to cause the autofill popup to be displayed.
void AutofillHighlightSuggestion(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* message);
// Causes a webpage form to be filled with autofill information from an
@ -663,43 +666,43 @@ class TestingAutomationProvider : public AutomationProvider,
// AutofillHighlightSuggestion() as needed to highlight the desired profile
// in the autofill popup.
void AutofillAcceptSelection(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* message);
// Signs in to sync using the given username and password.
// Uses the JSON interface for input/output.
void SignInToSync(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Returns info about sync.
// Uses the JSON interface for input/output.
void GetSyncInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Waits for the ongoing sync cycle to complete.
// Uses the JSON interface for input/output.
void AwaitSyncCycleCompletion(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Waits for sync to reinitialize (for example, after a browser restart).
// Uses the JSON interface for input/output.
void AwaitSyncRestart(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Enables sync for one or more sync datatypes.
// Uses the JSON interface for input/output.
void EnableSyncForDatatypes(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Disables sync for one or more sync datatypes.
// Uses the JSON interface for input/output.
void DisableSyncForDatatypes(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Translate DictionaryValues of autofill profiles and credit cards to the
@ -708,16 +711,16 @@ class TestingAutomationProvider : public AutomationProvider,
// profiles/cards: the ListValue of profiles/credit cards to translate.
// error_message: a pointer to the return string in case of error.
static std::vector<AutofillProfile> GetAutofillProfilesFromList(
const ListValue& profiles, std::string* error_message);
const base::ListValue& profiles, std::string* error_message);
static std::vector<CreditCard> GetCreditCardsFromList(
const ListValue& cards, std::string* error_message);
const base::ListValue& cards, std::string* error_message);
// The opposite of the above: translates from the internal data structure
// for profiles and credit cards to a ListValue of DictionaryValues. The
// caller owns the returned object.
static ListValue* GetListFromAutofillProfiles(
static base::ListValue* GetListFromAutofillProfiles(
const std::vector<AutofillProfile*>& autofill_profiles);
static ListValue* GetListFromCreditCards(
static base::ListValue* GetListFromCreditCards(
const std::vector<CreditCard*>& credit_cards);
// Return the map from the internal data representation to the string value
@ -730,63 +733,63 @@ class TestingAutomationProvider : public AutomationProvider,
// Get a list of active HTML5 notifications.
// Uses the JSON interface for input/output.
void GetActiveNotifications(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Close an active HTML5 notification.
// Uses the JSON interface for input/output.
void CloseNotification(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Waits for the number of active HTML5 notifications to reach a given count.
// Uses the JSON interface for input/output.
void WaitForNotificationCount(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Gets info about the elements in the NTP.
// Uses the JSON interface for input/output.
void GetNTPInfo(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Moves a thumbnail in the NTP's Most Visited sites section to a different
// index.
// Uses the JSON interface for input/output.
void MoveNTPMostVisitedThumbnail(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Removes a thumbnail from the NTP's Most Visited sites section.
// Uses the JSON interface for input/output.
void RemoveNTPMostVisitedThumbnail(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Unpins a thumbnail in the NTP's Most Visited sites section.
// Uses the JSON interface for input/output.
void UnpinNTPMostVisitedThumbnail(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Restores all thumbnails that have been removed (i.e., blacklisted) from the
// NTP's Most Visited sites section.
// Uses the JSON interface for input/output.
void RestoreAllNTPMostVisitedThumbnails(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Kills the given renderer process and returns after the associated
// RenderProcessHost receives notification of its closing.
void KillRendererProcess(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Populates the fields of the event parameter with what is found in the
// args parameter. Upon failure, returns false and puts the error message in
// the error parameter, otherwise returns true.
bool BuildWebKeyEventFromArgs(DictionaryValue* args,
bool BuildWebKeyEventFromArgs(base::DictionaryValue* args,
std::string* error,
NativeWebKeyboardEvent* event);
@ -804,38 +807,38 @@ class TestingAutomationProvider : public AutomationProvider,
// Determines whether each relevant section of the NTP is in thumbnail mode.
void GetNTPThumbnailMode(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Puts or removes the specified section of the NTP into/from thumbnail mode.
// If the section is put into thumbnail mode, all other relevant sections are
// removed from thumbnail mode.
void SetNTPThumbnailMode(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Determines whether each relevant section of the NTP is in menu mode.
void GetNTPMenuMode(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Puts or removes the specified section of the NTP into/from menu mode.
void SetNTPMenuMode(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Launches the specified app from the currently-selected tab.
void LaunchApp(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Sets the launch type for the specified app.
void SetAppLaunchType(Browser* browser,
DictionaryValue* args,
base::DictionaryValue* args,
IPC::Message* reply_message);
// Waits for all tabs to stop loading.
void WaitForAllTabsToStopLoading(DictionaryValue* args,
void WaitForAllTabsToStopLoading(base::DictionaryValue* args,
IPC::Message* reply_message);
// Gets the browser and tab index of the given tab. Uses the JSON interface.
@ -847,7 +850,8 @@ class TestingAutomationProvider : public AutomationProvider,
// "tab_handle": 3 // optional
// }
// output: { "windex": 1, "tab_index": 5 }
void GetIndicesFromTab(DictionaryValue* args, IPC::Message* reply_message);
void GetIndicesFromTab(base::DictionaryValue* args,
IPC::Message* reply_message);
// Navigates to the given URL. Uses the JSON interface.
// Example:
@ -857,7 +861,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "navigation_count": 1 // number of navigations to wait for
// }
// output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS }
void NavigateToURL(DictionaryValue* args, IPC::Message* reply_message);
void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message);
// Executes javascript in the specified frame. Uses the JSON interface.
// Waits for a result from the |DOMAutomationController|. The javascript
@ -877,7 +881,7 @@ class TestingAutomationProvider : public AutomationProvider,
// dropped.
// TODO(kkania): Replace the non-JSON counterparts and drop the JSON suffix.
void ExecuteJavascriptJSON(
DictionaryValue* args, IPC::Message* reply_message);
base::DictionaryValue* args, IPC::Message* reply_message);
// Goes forward in the specified tab. Uses the JSON interface.
// Example:
@ -885,7 +889,7 @@ class TestingAutomationProvider : public AutomationProvider,
// output: { "did_go_forward": true, // optional
// "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional
// }
void GoForward(DictionaryValue* args, IPC::Message* reply_message);
void GoForward(base::DictionaryValue* args, IPC::Message* reply_message);
// Goes back in the specified tab. Uses the JSON interface.
// Example:
@ -893,25 +897,26 @@ class TestingAutomationProvider : public AutomationProvider,
// output: { "did_go_back": true, // optional
// "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional
// }
void GoBack(DictionaryValue* args, IPC::Message* reply_message);
void GoBack(base::DictionaryValue* args, IPC::Message* reply_message);
// Reload the specified tab. Uses the JSON interface.
// Example:
// input: { "windex": 1, "tab_index": 1 }
// output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional }
void ReloadJSON(DictionaryValue* args, IPC::Message* reply_message);
void ReloadJSON(base::DictionaryValue* args, IPC::Message* reply_message);
// Get the current url of the specified tab. Uses the JSON interface.
// Example:
// input: { "windex": 1, "tab_index": 1 }
// output: { "url": "http://www.google.com" }
void GetTabURLJSON(DictionaryValue* args, IPC::Message* reply_message);
void GetTabURLJSON(base::DictionaryValue* args, IPC::Message* reply_message);
// Get the current url of the specified tab. Uses the JSON interface.
// Example:
// input: { "windex": 1, "tab_index": 1 }
// output: { "title": "Google" }
void GetTabTitleJSON(DictionaryValue* args, IPC::Message* reply_message);
void GetTabTitleJSON(base::DictionaryValue* args,
IPC::Message* reply_message);
// Captures the entire page of the the specified tab, including the
// non-visible portions of the page, and saves the PNG to a file.
@ -919,7 +924,7 @@ class TestingAutomationProvider : public AutomationProvider,
// input: { "windex": 1, "tab_index": 1, "path":"/tmp/foo.png"}
// output: none
void CaptureEntirePageJSON(
DictionaryValue* args, IPC::Message* reply_message);
base::DictionaryValue* args, IPC::Message* reply_message);
// Gets the cookies for the given URL. Uses the JSON interface.
// "expiry" refers to the amount of seconds since the Unix epoch. If omitted,
@ -937,7 +942,7 @@ class TestingAutomationProvider : public AutomationProvider,
// }
// ]
// }
void GetCookiesJSON(DictionaryValue* args, IPC::Message* reply_message);
void GetCookiesJSON(base::DictionaryValue* args, IPC::Message* reply_message);
// Deletes the cookie with the given name for the URL. Uses the JSON
// interface.
@ -947,7 +952,8 @@ class TestingAutomationProvider : public AutomationProvider,
// "name": "my_cookie"
// }
// output: none
void DeleteCookieJSON(DictionaryValue* args, IPC::Message* reply_message);
void DeleteCookieJSON(base::DictionaryValue* args,
IPC::Message* reply_message);
// Sets a cookie for the given URL. Uses the JSON interface.
// "expiry" refers to the amount of seconds since the Unix epoch. If omitted,
@ -971,25 +977,25 @@ class TestingAutomationProvider : public AutomationProvider,
// }
// }
// output: none
void SetCookieJSON(DictionaryValue* args, IPC::Message* reply_message);
void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message);
// Gets the ID for every open tab. This ID is unique per session.
// Example:
// input: none
// output: { "ids": [4124, 213, 1] }
void GetTabIds(DictionaryValue* args, IPC::Message* reply_message);
void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message);
// Checks if the given tab ID refers to an open tab.
// Example:
// input: { "id": 41 }
// output: { "is_valid": false }
void IsTabIdValid(DictionaryValue* args, IPC::Message* reply_message);
void IsTabIdValid(base::DictionaryValue* args, IPC::Message* reply_message);
// Closes the specified tab.
// Example:
// input: { "windex": 1, "tab_index": 1 }
// output: none
void CloseTabJSON(DictionaryValue* args, IPC::Message* reply_message);
void CloseTabJSON(base::DictionaryValue* args, IPC::Message* reply_message);
// Sends the WebKit events for a mouse click at a given coordinate.
// Example:
@ -1000,7 +1006,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "y": 100
// }
// output: none
void WebkitMouseClick(DictionaryValue* args,
void WebkitMouseClick(base::DictionaryValue* args,
IPC::Message* message);
// Sends the WebKit event for a mouse move to a given coordinate.
@ -1011,7 +1017,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "y": 100
// }
// output: none
void WebkitMouseMove(DictionaryValue* args,
void WebkitMouseMove(base::DictionaryValue* args,
IPC::Message* message);
// Sends the WebKit events for a mouse drag between two coordinates.
@ -1024,7 +1030,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "end_y": 100
// }
// output: none
void WebkitMouseDrag(DictionaryValue* args,
void WebkitMouseDrag(base::DictionaryValue* args,
IPC::Message* message);
// Sends the WebKit events for a mouse button down at a given coordinate.
@ -1035,7 +1041,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "y": 100
// }
// output: none
void WebkitMouseButtonDown(DictionaryValue* args,
void WebkitMouseButtonDown(base::DictionaryValue* args,
IPC::Message* message);
// Sends the WebKit events for a mouse button up at a given coordinate.
@ -1046,7 +1052,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "y": 100
// }
// output: none
void WebkitMouseButtonUp(DictionaryValue* args,
void WebkitMouseButtonUp(base::DictionaryValue* args,
IPC::Message* message);
// Sends the WebKit events for a mouse double click at a given coordinate.
@ -1057,7 +1063,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "y": 100
// }
// output: none
void WebkitMouseDoubleClick(DictionaryValue* args,
void WebkitMouseDoubleClick(base::DictionaryValue* args,
IPC::Message* message);
// Drag and drop file paths at a given coordinate.
@ -1071,7 +1077,7 @@ class TestingAutomationProvider : public AutomationProvider,
// ],
// }
// output: none
void DragAndDropFilePaths(DictionaryValue* args,
void DragAndDropFilePaths(base::DictionaryValue* args,
IPC::Message* message);
// Sends the WebKit key event with the specified properties.
@ -1087,7 +1093,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "isSystemKey": false
// }
// output: none
void SendWebkitKeyEvent(DictionaryValue* args,
void SendWebkitKeyEvent(base::DictionaryValue* args,
IPC::Message* message);
// Sends the key event from the OS level to the browser window,
@ -1100,7 +1106,7 @@ class TestingAutomationProvider : public AutomationProvider,
// "modifiers": automation::kShiftKeyMask,
// }
// output: none
void SendOSLevelKeyEventToTab(DictionaryValue* args,
void SendOSLevelKeyEventToTab(base::DictionaryValue* args,
IPC::Message* message);
// Method used as a Task that sends a success AutomationJSONReply.
@ -1111,7 +1117,7 @@ class TestingAutomationProvider : public AutomationProvider,
// input: none
// output: { "message": "This is an alert!" }
void GetAppModalDialogMessage(
DictionaryValue* args, IPC::Message* reply_message);
base::DictionaryValue* args, IPC::Message* reply_message);
// Accepts or dismisses the active JavaScript modal dialog. If optional
// prompt text is given, it will be used as the result of the prompt dialog.
@ -1121,7 +1127,7 @@ class TestingAutomationProvider : public AutomationProvider,
// }
// output: none
void AcceptOrDismissAppModalDialog(
DictionaryValue* args, IPC::Message* reply_message);
base::DictionaryValue* args, IPC::Message* reply_message);
// Activates the given tab.
// Example:
@ -1129,78 +1135,86 @@ class TestingAutomationProvider : public AutomationProvider,
// "tab_index": 1,
// }
// output: none
void ActivateTabJSON(DictionaryValue* args, IPC::Message* message);
void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message);
// Gets the version of ChromeDriver automation supported by this server.
// Example:
// input: none
// output: { "version": 1 }
void GetChromeDriverAutomationVersion(DictionaryValue* args,
void GetChromeDriverAutomationVersion(base::DictionaryValue* args,
IPC::Message* message);
// Auto-updates installed extensions.
// Uses the JSON interface for input/output.
void UpdateExtensionsNow(DictionaryValue* args, IPC::Message* reply_message);
void UpdateExtensionsNow(base::DictionaryValue* args,
IPC::Message* reply_message);
#if defined(OS_CHROMEOS)
void GetLoginInfo(DictionaryValue* args, IPC::Message* reply_message);
void GetLoginInfo(base::DictionaryValue* args, IPC::Message* reply_message);
void ShowCreateAccountUI(DictionaryValue* args, IPC::Message* reply_message);
void ShowCreateAccountUI(base::DictionaryValue* args,
IPC::Message* reply_message);
void LoginAsGuest(DictionaryValue* args, IPC::Message* reply_message);
void LoginAsGuest(base::DictionaryValue* args, IPC::Message* reply_message);
void Login(DictionaryValue* args, IPC::Message* reply_message);
void Login(base::DictionaryValue* args, IPC::Message* reply_message);
void LockScreen(DictionaryValue* args, IPC::Message* reply_message);
void LockScreen(base::DictionaryValue* args, IPC::Message* reply_message);
void UnlockScreen(DictionaryValue* args, IPC::Message* reply_message);
void UnlockScreen(base::DictionaryValue* args, IPC::Message* reply_message);
void SignoutInScreenLocker(DictionaryValue* args,
void SignoutInScreenLocker(base::DictionaryValue* args,
IPC::Message* reply_message);
void GetBatteryInfo(DictionaryValue* args, IPC::Message* reply_message);
void GetBatteryInfo(base::DictionaryValue* args, IPC::Message* reply_message);
void GetNetworkInfo(DictionaryValue* args, IPC::Message* reply_message);
void GetNetworkInfo(base::DictionaryValue* args, IPC::Message* reply_message);
void NetworkScan(DictionaryValue* args, IPC::Message* reply_message);
void NetworkScan(base::DictionaryValue* args, IPC::Message* reply_message);
void GetProxySettings(DictionaryValue* args, IPC::Message* reply_message);
void GetProxySettings(base::DictionaryValue* args,
IPC::Message* reply_message);
void SetProxySettings(DictionaryValue* args, IPC::Message* reply_message);
void SetProxySettings(base::DictionaryValue* args,
IPC::Message* reply_message);
void ConnectToWifiNetwork(DictionaryValue* args, IPC::Message* reply_message);
void ConnectToWifiNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
void ConnectToHiddenWifiNetwork(DictionaryValue* args,
void ConnectToHiddenWifiNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
void DisconnectFromWifiNetwork(DictionaryValue* args,
void DisconnectFromWifiNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
// VPN automation
void AddPrivateNetwork(DictionaryValue* args, IPC::Message* reply_message);
void AddPrivateNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
void GetPrivateNetworkInfo(DictionaryValue* args,
void GetPrivateNetworkInfo(base::DictionaryValue* args,
IPC::Message* reply_message);
void ConnectToPrivateNetwork(DictionaryValue* args,
void ConnectToPrivateNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
void DisconnectFromPrivateNetwork(DictionaryValue* args,
void DisconnectFromPrivateNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
void ForgetWifiNetwork(DictionaryValue* args, IPC::Message* reply_message);
void ForgetWifiNetwork(base::DictionaryValue* args,
IPC::Message* reply_message);
void GetUpdateInfo(DictionaryValue* args, IPC::Message* reply_message);
void GetUpdateInfo(base::DictionaryValue* args, IPC::Message* reply_message);
void UpdateCheck(DictionaryValue* args, IPC::Message* reply_message);
void UpdateCheck(base::DictionaryValue* args, IPC::Message* reply_message);
void SetReleaseTrack(DictionaryValue* args, IPC::Message* reply_message);
void SetReleaseTrack(base::DictionaryValue* args,
IPC::Message* reply_message);
void GetVolumeInfo(DictionaryValue* args, IPC::Message* reply_message);
void GetVolumeInfo(base::DictionaryValue* args, IPC::Message* reply_message);
void SetVolume(DictionaryValue* args, IPC::Message* reply_message);
void SetVolume(base::DictionaryValue* args, IPC::Message* reply_message);
void SetMute(DictionaryValue* args, IPC::Message* reply_message);
void SetMute(base::DictionaryValue* args, IPC::Message* reply_message);
#endif // defined(OS_CHROMEOS)
void WaitForTabCountToBecome(int browser_handle,

@ -21,12 +21,15 @@
#include "webkit/glue/window_open_disposition.h"
class CommandLine;
class DictionaryValue;
class NotificationDelegate;
class PrefService;
class Profile;
class TabContents;
namespace base {
class DictionaryValue;
}
namespace gfx {
class Rect;
}
@ -114,9 +117,10 @@ class BackgroundContentsService : private NotificationObserver,
// Load a BackgroundContent; the settings are read from the provided
// dictionary.
void LoadBackgroundContentsFromDictionary(Profile* profile,
const std::string& extension_id,
const DictionaryValue* contents);
void LoadBackgroundContentsFromDictionary(
Profile* profile,
const std::string& extension_id,
const base::DictionaryValue* contents);
// Load the manifest-specified BackgroundContents for all apps for the
// profile.

@ -19,9 +19,12 @@
class BookmarkModel;
class BookmarkNode;
namespace base {
class DictionaryValue;
class ListValue;
class Value;
}
// BookmarkCodec is responsible for encoding/decoding bookmarks into JSON
// values. BookmarkCodec is used by BookmarkService.
@ -39,13 +42,13 @@ class BookmarkCodec {
// returned object. This is invoked to encode the contents of the bookmark bar
// model and is currently a convenience to invoking Encode that takes the
// bookmark bar node and other folder node.
Value* Encode(BookmarkModel* model);
base::Value* Encode(BookmarkModel* model);
// Encodes the bookmark bar and other folders returning the JSON value. It's
// up to the caller to delete the returned object.
// This method is public for use by StarredURLDatabase in migrating the
// bookmarks out of the database.
Value* Encode(const BookmarkNode* bookmark_bar_node,
base::Value* Encode(const BookmarkNode* bookmark_bar_node,
const BookmarkNode* other_folder_node,
const BookmarkNode* synced_folder_node);
@ -58,7 +61,7 @@ class BookmarkCodec {
BookmarkNode* other_folder_node,
BookmarkNode* synced_folder_node,
int64* max_node_id,
const Value& value);
const base::Value& value);
// Returns the checksum computed during last encoding/decoding call.
const std::string& computed_checksum() const { return computed_checksum_; }
@ -96,16 +99,16 @@ class BookmarkCodec {
private:
// Encodes node and all its children into a Value object and returns it.
// The caller takes ownership of the returned object.
Value* EncodeNode(const BookmarkNode* node);
base::Value* EncodeNode(const BookmarkNode* node);
// Helper to perform decoding.
bool DecodeHelper(BookmarkNode* bb_node,
BookmarkNode* other_folder_node,
BookmarkNode* synced_folder_node,
const Value& value);
const base::Value& value);
// Decodes the children of the specified node. Returns true on success.
bool DecodeChildren(const ListValue& child_value_list,
bool DecodeChildren(const base::ListValue& child_value_list,
BookmarkNode* parent);
// Reassigns bookmark IDs for all nodes.
@ -120,7 +123,7 @@ class BookmarkCodec {
// created appropriately by way of DecodeChildren. If node is NULL a new
// node is created and added to parent (parent must then be non-NULL),
// otherwise node is used.
bool DecodeNode(const DictionaryValue& value,
bool DecodeNode(const base::DictionaryValue& value,
BookmarkNode* parent,
BookmarkNode* node);

@ -17,8 +17,10 @@
#include "base/timer.h"
#include "third_party/cros/chromeos_network.h"
namespace base {
class DictionaryValue;
class Value;
}
namespace chromeos {
@ -242,8 +244,8 @@ class NetworkDevice {
bool support_network_scan() const { return support_network_scan_; }
private:
bool ParseValue(int index, const Value* value);
void ParseInfo(const DictionaryValue* info);
bool ParseValue(int index, const base::Value* value);
void ParseInfo(const base::DictionaryValue* info);
// General device info.
std::string device_path_;
@ -364,8 +366,8 @@ class Network {
Network(const std::string& service_path, ConnectionType type);
// Parse name/value pairs from libcros.
virtual bool ParseValue(int index, const Value* value);
virtual void ParseInfo(const DictionaryValue* info);
virtual bool ParseValue(int index, const base::Value* value);
virtual void ParseInfo(const base::DictionaryValue* info);
// Erase cached credentials, used when "Save password" is unchecked.
virtual void EraseCredentials();
@ -378,7 +380,7 @@ class Network {
std::string* dest);
virtual void SetBooleanProperty(const char* prop, bool b, bool* dest);
virtual void SetIntegerProperty(const char* prop, int i, int* dest);
virtual void SetValueProperty(const char* prop, Value* val);
virtual void SetValueProperty(const char* prop, base::Value* val);
virtual void ClearProperty(const char* prop);
// This will clear the property if string is empty. Otherwise, it will set it.
@ -502,13 +504,13 @@ class VirtualNetwork : public Network {
private:
// Network overrides.
virtual bool ParseValue(int index, const Value* value);
virtual void ParseInfo(const DictionaryValue* info);
virtual bool ParseValue(int index, const base::Value* value);
virtual void ParseInfo(const base::DictionaryValue* info);
virtual void EraseCredentials();
virtual void CalculateUniqueId();
// VirtualNetwork private methods.
bool ParseProviderValue(int index, const Value* value);
bool ParseProviderValue(int index, const base::Value* value);
void set_server_hostname(const std::string& server_hostname) {
server_hostname_ = server_hostname;
@ -559,7 +561,7 @@ class WirelessNetwork : public Network {
int strength_;
// Network overrides.
virtual bool ParseValue(int index, const Value* value);
virtual bool ParseValue(int index, const base::Value* value);
private:
void set_strength(int strength) { strength_ = strength; }
@ -592,7 +594,7 @@ class CellularNetwork : public WirelessNetwork {
Apn(const std::string& apn, const std::string& network_id,
const std::string& username, const std::string& password);
~Apn();
void Set(const DictionaryValue& dict);
void Set(const base::DictionaryValue& dict);
};
explicit CellularNetwork(const std::string& service_path);
@ -654,7 +656,7 @@ class CellularNetwork : public WirelessNetwork {
protected:
// WirelessNetwork overrides.
virtual bool ParseValue(int index, const Value* value);
virtual bool ParseValue(int index, const base::Value* value);
ActivationState activation_state_;
NetworkTechnology network_technology_;
@ -747,7 +749,7 @@ class WifiNetwork : public WirelessNetwork {
virtual void CalculateUniqueId();
// WirelessNetwork overrides.
virtual bool ParseValue(int index, const Value* value);
virtual bool ParseValue(int index, const base::Value* value);
void set_encryption(ConnectionSecurity encryption) {
encryption_ = encryption;

@ -18,9 +18,8 @@
namespace base {
template <typename T> struct DefaultLazyInstanceTraits;
}
class Value;
}
namespace chromeos {
@ -37,14 +36,14 @@ class CrosSettings : public base::NonThreadSafe {
// Sets |in_value| to given |path| in cros settings.
// Note that this takes ownership of |in_value|.
void Set(const std::string& path, Value* in_value);
void Set(const std::string& path, base::Value* in_value);
// Fires system setting change notification.
void FireObservers(const char* path);
// Gets settings value of given |path| to |out_value|.
// Note that the caller owns |out_value| returned.
bool Get(const std::string& path, Value** out_value) const;
bool Get(const std::string& path, base::Value** out_value) const;
// Convenience forms of Set(). These methods will replace any existing
// value at that path, even if it has a different type.

@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/common/chrome_switches.h"
namespace chromeos {

@ -7,7 +7,9 @@
#include <string>
namespace base {
class Value;
}
namespace chromeos {
@ -17,18 +19,18 @@ class CrosSettingsProvider {
// Sets |in_value| to given |path| in cros settings.
// Note that this takes ownership of |in_value|.
void Set(const std::string& path, Value* in_value);
void Set(const std::string& path, base::Value* in_value);
// Gets settings value of given |path| to |out_value|.
// Note that |out_value| is owned by the caller, not this class.
virtual bool Get(const std::string& path, Value** out_value) const = 0;
virtual bool Get(const std::string& path, base::Value** out_value) const = 0;
// Gets the namespace prefix provided by this provider
virtual bool HandlesSetting(const std::string& path) = 0;
private:
// Does the real job for Set().
virtual void DoSet(const std::string& path, Value* in_value) = 0;
virtual void DoSet(const std::string& path, base::Value* in_value) = 0;
};
} // namespace chromeos

@ -17,13 +17,13 @@
#include "content/common/url_fetcher.h"
#include "googleurl/src/gurl.h"
class DictionaryValue;
class FilePath;
class ListValue;
class PrefService;
namespace base {
class Time;
class DictionaryValue;
class ListValue;
class Time;
}
namespace chromeos {
@ -50,7 +50,7 @@ class CustomizationDocument {
const std::string& dictionary_name,
const std::string& entry_name) const;
scoped_ptr<DictionaryValue> root_;
scoped_ptr<base::DictionaryValue> root_;
private:
DISALLOW_COPY_AND_ASSIGN(CustomizationDocument);
@ -111,7 +111,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
// OEM specific carrier deal.
class CarrierDeal {
public:
explicit CarrierDeal(DictionaryValue* deal_dict);
explicit CarrierDeal(base::DictionaryValue* deal_dict);
~CarrierDeal();
// Returns string with the specified |locale| and |id|.
@ -132,7 +132,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
std::string top_up_url_;
int notification_count_;
base::Time expire_date_;
DictionaryValue* localized_strings_;
base::DictionaryValue* localized_strings_;
DISALLOW_COPY_AND_ASSIGN(CarrierDeal);
};

@ -15,11 +15,14 @@
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
class ListValue;
class NotificationDetails;
class NotificationSource;
class Profile;
namespace base {
class ListValue;
}
namespace chromeos {
// Performs check whether locale has been changed automatically recently
@ -40,7 +43,7 @@ class LocaleChangeGuard : public NotificationObserver {
private:
class Delegate;
void RevertLocaleChange(const ListValue* list);
void RevertLocaleChange(const base::ListValue* list);
void AcceptLocaleChange();
void Check();

@ -15,7 +15,9 @@
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "views/view.h"
namespace base {
class DictionaryValue;
}
namespace views {
class GridLayout;
@ -63,7 +65,7 @@ class EnterpriseEnrollmentView : public views::View,
private:
// Updates the gaia login box.
void UpdateGaiaLogin(const DictionaryValue& args);
void UpdateGaiaLogin(const base::DictionaryValue& args);
// Display the given i18n string as error message.
void ShowError(int message_id);

@ -27,8 +27,8 @@ class MetricsCrosSettingsProvider : public CrosSettingsProvider {
private:
// CrosSettingsProvider implementation.
virtual void DoSet(const std::string& path, Value* value);
virtual bool Get(const std::string& path, Value** value) const;
virtual void DoSet(const std::string& path, base::Value* value);
virtual bool Get(const std::string& path, base::Value** value) const;
virtual bool HandlesSetting(const std::string& path);
DISALLOW_COPY_AND_ASSIGN(MetricsCrosSettingsProvider);

@ -30,8 +30,8 @@ class NetworkMessageObserver : public NetworkLibrary::NetworkManagerObserver,
static bool IsApplicableBackupPlan(const CellularDataPlan* plan,
const CellularDataPlan* other_plan);
private:
virtual void OpenMobileSetupPage(const ListValue* args);
virtual void OpenMoreInfoPage(const ListValue* args);
virtual void OpenMobileSetupPage(const base::ListValue* args);
virtual void OpenMoreInfoPage(const base::ListValue* args);
virtual void InitNewPlan(const CellularDataPlan* plan);
virtual void ShowNeedsPlanNotification(const CellularNetwork* cellular);
virtual void ShowNoDataNotification(CellularDataPlanType plan_type);

@ -15,12 +15,15 @@
#include "base/compiler_specific.h"
#include "ui/gfx/native_widget_types.h"
class ListValue;
class GURL;
namespace base {
class ListValue;
}
namespace chromeos {
typedef Callback1<const ListValue*>::Type MessageCallback;
typedef Callback1<const base::ListValue*>::Type MessageCallback;
class BalloonViewHost : public ::BalloonViewHost {
public:
@ -45,7 +48,7 @@ class BalloonViewHost : public ::BalloonViewHost {
// Message handlers.
virtual void OnWebUISend(const GURL& source_url,
const std::string& name,
const ListValue& args);
const base::ListValue& args);
DISALLOW_COPY_AND_ASSIGN(BalloonViewHost);
};

@ -12,10 +12,13 @@
#include "chrome/browser/chromeos/network_state_notifier.h"
#include "chrome/browser/tab_contents/chrome_interstitial_page.h"
class DictionaryValue;
class Extension;
class TabContents;
namespace base {
class DictionaryValue;
}
namespace chromeos {
// OfflineLoadPage class shows the interstitial page that is shown
@ -69,9 +72,9 @@ class OfflineLoadPage : public ChromeInterstitialPage {
// normal site.
void GetAppOfflineStrings(const Extension* app,
const string16& faield_url,
DictionaryValue* strings) const;
base::DictionaryValue* strings) const;
void GetNormalOfflineStrings(const string16& faield_url,
DictionaryValue* strings) const;
base::DictionaryValue* strings) const;
// True if there is a mobile network is available but
// has not been activated.

@ -12,10 +12,13 @@
#include "chrome/browser/chromeos/cros_settings_provider.h"
#include "chrome/browser/chromeos/login/signed_settings_helper.h"
class ListValue;
class PrefService;
class Task;
namespace base {
class ListValue;
}
namespace chromeos {
// CrosSettingsProvider implementation that works with SignedSettings.
@ -48,7 +51,7 @@ class UserCrosSettingsProvider : public CrosSettingsProvider {
static bool cached_allow_new_user();
static bool cached_data_roaming_enabled();
static bool cached_show_users_on_signin();
static const ListValue* cached_whitelist();
static const base::ListValue* cached_whitelist();
static std::string cached_owner();
// Returns true if given email is in user whitelist.
@ -57,7 +60,7 @@ class UserCrosSettingsProvider : public CrosSettingsProvider {
static bool IsEmailInCachedWhitelist(const std::string& email);
// CrosSettingsProvider implementation.
virtual bool Get(const std::string& path, Value** out_value) const;
virtual bool Get(const std::string& path, base::Value** out_value) const;
virtual bool HandlesSetting(const std::string& path);
void WhitelistUser(const std::string& email);
@ -68,7 +71,7 @@ class UserCrosSettingsProvider : public CrosSettingsProvider {
private:
// CrosSettingsProvider implementation.
virtual void DoSet(const std::string& path, Value* value);
virtual void DoSet(const std::string& path, base::Value* value);
DISALLOW_COPY_AND_ASSIGN(UserCrosSettingsProvider);
};

@ -15,7 +15,10 @@
#include "chrome/common/content_settings_types.h"
class GURL;
namespace base {
class Value;
}
namespace content_settings {
@ -28,14 +31,14 @@ class OriginIdentifierValueMap {
const ContentSettingsPattern& secondary_pattern,
ContentSettingsType content_type,
ResourceIdentifier identifier,
Value* value);
base::Value* value);
~Entry();
ContentSettingsPattern primary_pattern;
ContentSettingsPattern secondary_pattern;
ContentSettingsType content_type;
ResourceIdentifier identifier;
linked_ptr<Value> value;
linked_ptr<base::Value> value;
};
typedef std::list<Entry> EntryList;
@ -70,7 +73,7 @@ class OriginIdentifierValueMap {
// Returns a weak pointer to the value for the given |primary_pattern|,
// |secondary_pattern|, |content_type|, |resource_identifier| tuple. If
// no value is stored for the passed parameter |NULL| is returned.
Value* GetValue(
base::Value* GetValue(
const GURL& primary_url,
const GURL& secondary_url,
ContentSettingsType content_type,
@ -84,7 +87,7 @@ class OriginIdentifierValueMap {
const ContentSettingsPattern& secondary_pattern,
ContentSettingsType content_type,
const ResourceIdentifier& resource_identifier,
Value* value);
base::Value* value);
// Deletes the map entry for the given |primary_pattern|,
// |secondary_pattern|, |content_type|, |resource_identifier| tuple.

@ -20,7 +20,6 @@
#include "content/common/notification_registrar.h"
class ContentSettingsDetails;
class DictionaryValue;
class HostContentSettingsMap;
class PrefService;

@ -22,10 +22,13 @@
#include "content/common/notification_registrar.h"
class ContentSettingsDetails;
class DictionaryValue;
class HostContentSettingsMap;
class PrefService;
namespace base {
class DictionaryValue;
}
namespace content_settings {
// Content settings provider that provides default content settings based on
@ -62,7 +65,7 @@ class PrefDefaultProvider : public DefaultProviderInterface,
void NotifyObservers(const ContentSettingsDetails& details);
// Sets the fields of |settings| based on the values in |dictionary|.
void GetSettingsFromDictionary(const DictionaryValue* dictionary,
void GetSettingsFromDictionary(const base::DictionaryValue* dictionary,
ContentSettings* settings);
// Forces the default settings to be explicitly set instead of themselves
@ -187,7 +190,7 @@ class PrefProvider : public ProviderInterface,
void SyncObsoletePref();
static void CanonicalizeContentSettingsExceptions(
DictionaryValue* all_settings_dictionary);
base::DictionaryValue* all_settings_dictionary);
void NotifyObservers(const ContentSettingsDetails& details);

@ -31,7 +31,6 @@ class ProviderInterface;
} // namespace content_settings
class ContentSettingsDetails;
class DictionaryValue;
class ExtensionService;
class GURL;
class PrefService;

@ -22,7 +22,6 @@
class BaseDownloadItemModel;
class CrxInstaller;
class DictionaryValue;
class DownloadItem;
class DownloadManager;
class GURL;
@ -34,6 +33,7 @@ struct DownloadCreateInfo;
struct DownloadSaveInfo;
namespace base {
class DictionaryValue;
class TimeTicks;
}
@ -227,7 +227,7 @@ void DragDownload(const DownloadItem* download,
// Creates a representation of a download in a format that the downloads
// HTML page can understand.
DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id);
base::DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id);
// Get the localized status text for an in-progress download.
string16 GetProgressStatusText(DownloadItem* download);

@ -19,7 +19,10 @@
class EnumerateModulesModel;
class FilePath;
namespace base {
class ListValue;
}
// A helper class that implements the enumerate module functionality on the File
// thread.
@ -261,7 +264,7 @@ class EnumerateModulesModel {
void ScanNow();
// Gets the whole module list as a ListValue.
ListValue* GetModuleList() const;
base::ListValue* GetModuleList() const;
private:
friend struct DefaultSingletonTraits<EnumerateModulesModel>;

@ -59,7 +59,7 @@ class CrxInstaller
WhitelistEntry();
~WhitelistEntry();
scoped_ptr<DictionaryValue> parsed_manifest;
scoped_ptr<base::DictionaryValue> parsed_manifest;
std::string localized_name;
};
@ -168,7 +168,7 @@ class CrxInstaller
virtual void OnUnpackFailure(const std::string& error_message);
virtual void OnUnpackSuccess(const FilePath& temp_dir,
const FilePath& extension_dir,
const DictionaryValue* original_manifest,
const base::DictionaryValue* original_manifest,
const Extension* extension);
// Returns true if we can skip confirmation because the install was
@ -237,7 +237,7 @@ class CrxInstaller
// A parsed copy of the unmodified original manifest, before any
// transformations like localization have taken place.
scoped_ptr<DictionaryValue> original_manifest_;
scoped_ptr<base::DictionaryValue> original_manifest_;
// If non-empty, contains the current version of the extension we're
// installing (for upgrades).

@ -12,21 +12,24 @@
class BookmarkModel;
class BookmarkNode;
namespace base {
class DictionaryValue;
class ListValue;
}
// Helper functions.
namespace extension_bookmark_helpers {
DictionaryValue* GetNodeDictionary(const BookmarkNode* node,
bool recurse,
bool only_folders);
base::DictionaryValue* GetNodeDictionary(const BookmarkNode* node,
bool recurse,
bool only_folders);
// Add a JSON representation of |node| to the JSON |list|.
void AddNode(const BookmarkNode* node, ListValue* list, bool recurse);
void AddNode(const BookmarkNode* node, base::ListValue* list, bool recurse);
void AddNodeFoldersOnly(const BookmarkNode* node,
ListValue* list,
base::ListValue* list,
bool recurse);
bool RemoveNode(BookmarkModel* model,

@ -12,10 +12,13 @@
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
struct BookmarkNodeData;
class ListValue;
class Profile;
class TabContentsWrapper;
namespace base {
class ListValue;
}
// Class that handles the chrome.experimental.bookmarkManager events.
class ExtensionBookmarkManagerEventRouter
: public BookmarkTabHelper::BookmarkDrag {
@ -39,7 +42,7 @@ class ExtensionBookmarkManagerEventRouter
private:
// Helper to actually dispatch an event to extension listeners.
void DispatchEvent(const char* event_name, const ListValue* args);
void DispatchEvent(const char* event_name, const base::ListValue* args);
void DispatchDragEvent(const BookmarkNodeData& data, const char* event_name);

@ -20,6 +20,10 @@
class FilePath;
namespace base {
class ListValue;
}
// Observes BookmarkModel and then routes the notifications as events to
// the extension system.
class ExtensionBookmarkEventRouter : public BookmarkModelObserver {
@ -143,7 +147,7 @@ class RemoveBookmarkFunction : public BookmarksFunction {
public:
// Returns true on successful parse and sets invalid_id to true if conversion
// from id string to int64 failed.
static bool ExtractIds(const ListValue* args, std::list<int64>* ids,
static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
bool* invalid_id);
// BookmarksFunction:
virtual bool RunImpl() OVERRIDE;
@ -171,7 +175,7 @@ class CreateBookmarkFunction : public BookmarksFunction {
class MoveBookmarkFunction : public BookmarksFunction {
public:
static bool ExtractIds(const ListValue* args, std::list<int64>* ids,
static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
bool* invalid_id);
virtual void GetQuotaLimitHeuristics(
std::list<QuotaLimitHeuristic*>* heuristics) const;
@ -184,7 +188,7 @@ class MoveBookmarkFunction : public BookmarksFunction {
class UpdateBookmarkFunction : public BookmarksFunction {
public:
static bool ExtractIds(const ListValue* args, std::list<int64>* ids,
static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
bool* invalid_id);
virtual void GetQuotaLimitHeuristics(
std::list<QuotaLimitHeuristic*>* heuristics) const;

@ -9,9 +9,12 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/common/extensions/extension_action.h"
class DictionaryValue;
class ExtensionAction;
namespace base {
class DictionaryValue;
}
// Base class for chrome.browserAction.* APIs.
class BrowserActionFunction : public SyncExtensionFunction {
protected:
@ -25,7 +28,7 @@ class BrowserActionFunction : public SyncExtensionFunction {
// All the browser action APIs take a single argument called details that is
// a dictionary.
DictionaryValue* details_;
base::DictionaryValue* details_;
// The tab id the browser action function should apply to, if any, or
// kDefaultTabId if none was specified.

@ -20,8 +20,9 @@
#include "chrome/common/content_settings.h"
#include "googleurl/src/gurl.h"
class DictionaryValue;
namespace base {
class ListValue;
}
// This class is the backend for extension-defined content settings. It is used
// by the content_settings::ExtensionProvider to integrate its settings into the
@ -82,13 +83,13 @@ class ExtensionContentSettingsStore
// Serializes all content settings set by the extension with ID |extension_id|
// and returns them as a ListValue. The caller takes ownership of the returned
// value.
ListValue* GetSettingsForExtension(const std::string& extension_id,
ExtensionPrefsScope scope) const;
base::ListValue* GetSettingsForExtension(const std::string& extension_id,
ExtensionPrefsScope scope) const;
// Deserializes content settings rules from |list| and applies them as set by
// the extension with ID |extension_id|.
void SetExtensionContentSettingsFromList(const std::string& extension_id,
const ListValue* list,
const base::ListValue* list,
ExtensionPrefsScope scope);
// //////////////////////////////////////////////////////////////////////////

@ -10,16 +10,19 @@
#include "chrome/browser/extensions/extension_menu_manager.h"
#include "chrome/common/extensions/url_pattern_set.h"
class DictionaryValue;
class ExtensionMenuItem;
namespace base {
class DictionaryValue;
}
class ExtensionContextMenuFunction : public SyncExtensionFunction {
public:
virtual ~ExtensionContextMenuFunction() {}
protected:
// Helper function to read and parse a list of menu item contexts.
bool ParseContexts(const DictionaryValue& properties,
bool ParseContexts(const base::DictionaryValue& properties,
const char* key,
ExtensionMenuItem::ContextList* result);
@ -27,25 +30,25 @@ class ExtensionContextMenuFunction : public SyncExtensionFunction {
// error, returns false and puts an error message into error_. If the key is
// not present, |result| is set to |default_value| and the return value is
// true.
bool ParseType(const DictionaryValue& properties,
bool ParseType(const base::DictionaryValue& properties,
const ExtensionMenuItem::Type& default_value,
ExtensionMenuItem::Type* result);
// Helper to read and parse the "checked" property.
bool ParseChecked(ExtensionMenuItem::Type type,
const DictionaryValue& properties,
const base::DictionaryValue& properties,
bool default_value,
bool* checked);
// Helper to read in a set of url patterns from a property with the given key
// name.
bool ParseURLPatterns(const DictionaryValue& properties,
bool ParseURLPatterns(const base::DictionaryValue& properties,
const char* key,
URLPatternSet* result);
// Reads in any document and targetUrl patterns from |properties| and sets
// them on |item|.
bool SetURLPatterns(const DictionaryValue& properties,
bool SetURLPatterns(const base::DictionaryValue& properties,
ExtensionMenuItem* item);
// If the parentId key was specified in properties, this will try looking up
@ -54,7 +57,7 @@ class ExtensionContextMenuFunction : public SyncExtensionFunction {
// parentId key is not in properties, this will return true and leave |result|
// unset. Also, it is considered an error if the item found has a type other
// than NORMAL.
bool GetParent(const DictionaryValue& properties,
bool GetParent(const base::DictionaryValue& properties,
const ExtensionMenuManager& manager,
ExtensionMenuItem** result);
};

@ -20,7 +20,9 @@
#include "googleurl/src/gurl.h"
#include "net/base/cookie_monster.h"
namespace base {
class DictionaryValue;
}
namespace net {
class URLRequestContextGetter;
@ -74,7 +76,7 @@ class CookiesFunction : public AsyncExtensionFunction {
// URL is invalid or isn't found in the dictionary. If check_host_permissions
// is true, the URL is also checked against the extension's host permissions,
// and if there is no permission for the URL, this function returns false.
bool ParseUrl(const DictionaryValue* details, GURL* url,
bool ParseUrl(const base::DictionaryValue* details, GURL* url,
bool check_host_permissions);
// Checks the given details dictionary for a 'storeId' value, and retrieves
@ -84,7 +86,7 @@ class CookiesFunction : public AsyncExtensionFunction {
// assigns the internal error_ value if that occurs.
// At least one of the output parameters store and store_id should be
// non-NULL.
bool ParseStoreContext(const DictionaryValue* details,
bool ParseStoreContext(const base::DictionaryValue* details,
net::URLRequestContextGetter** context,
std::string* store_id);
};
@ -119,7 +121,7 @@ class GetAllCookiesFunction : public CookiesFunction {
void GetAllCookiesOnIOThread();
void RespondOnUIThread();
DictionaryValue* details_;
base::DictionaryValue* details_;
GURL url_;
std::string store_id_;
scoped_refptr<net::URLRequestContextGetter> store_context_;

@ -16,11 +16,14 @@
#include "net/base/cookie_monster.h"
class Browser;
class DictionaryValue;
class Extension;
class ListValue;
class Profile;
namespace base {
class DictionaryValue;
class ListValue;
}
namespace extension_cookies_helpers {
// Returns either the original profile or the incognito profile, based on the
@ -36,15 +39,15 @@ const char* GetStoreIdFromProfile(Profile* profile);
// Constructs a Cookie object as defined by the cookies API. This function
// allocates a new DictionaryValue object; the caller is responsible for
// freeing it.
DictionaryValue* CreateCookieValue(
base::DictionaryValue* CreateCookieValue(
const net::CookieMonster::CanonicalCookie& cookie,
const std::string& store_id);
// Constructs a CookieStore object as defined by the cookies API. This function
// allocates a new DictionaryValue object; the caller is responsible for
// freeing it.
DictionaryValue* CreateCookieStoreValue(Profile* profile,
ListValue* tab_ids);
base::DictionaryValue* CreateCookieStoreValue(Profile* profile,
base::ListValue* tab_ids);
// Retrieves all cookies from the given cookie store corresponding to the given
// URL. If the URL is empty, all cookies in the cookie store are retrieved.
@ -65,13 +68,13 @@ GURL GetURLFromCanonicalCookie(
void AppendMatchingCookiesToList(
const net::CookieList& all_cookies,
const std::string& store_id,
const GURL& url, const DictionaryValue* details,
const GURL& url, const base::DictionaryValue* details,
const Extension* extension,
ListValue* match_list);
base::ListValue* match_list);
// Appends the IDs of all tabs belonging to the given browser to the
// given list.
void AppendToTabIdList(Browser* browser, ListValue* tab_ids);
void AppendToTabIdList(Browser* browser, base::ListValue* tab_ids);
// A class representing the cookie filter parameters passed into
// cookies.getAll().
@ -84,7 +87,7 @@ class MatchFilter {
// Takes the details dictionary argument given by the user as input.
// This class does not take ownership of the lifetime of the DictionaryValue
// object.
explicit MatchFilter(const DictionaryValue* details);
explicit MatchFilter(const base::DictionaryValue* details);
// Returns true if the given cookie matches the properties in the match
// filter.
@ -110,7 +113,7 @@ class MatchFilter {
// 'foo.bar.com', '.foo.bar.com', and 'baz.foo.bar.com'.
bool MatchesDomain(const std::string& domain);
const DictionaryValue* details_;
const base::DictionaryValue* details_;
};
} // namespace extension_cookies_helpers

@ -15,10 +15,13 @@
// Base debugger function.
class DictionaryValue;
class ExtensionDevToolsClientHost;
class TabContents;
namespace base {
class DictionaryValue;
}
class DebuggerFunction : public AsyncExtensionFunction {
protected:
DebuggerFunction();
@ -56,7 +59,7 @@ class SendRequestDebuggerFunction : public DebuggerFunction {
virtual ~SendRequestDebuggerFunction();
virtual bool RunImpl();
void SendResponseBody(DictionaryValue* dictionary);
void SendResponseBody(base::DictionaryValue* dictionary);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.debugger.sendRequest")
};

@ -104,7 +104,7 @@ class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction {
// Initates execution of context menu tasks identified with |task_id| for
// each element of |files_list|.
bool InitiateFileTaskExecution(const std::string& task_id,
ListValue* files_list);
base::ListValue* files_list);
void RequestFileEntryOnFileThread(const GURL& source_url,
const std::string& task_id,
const std::vector<GURL>& file_urls);

@ -27,10 +27,13 @@ class ExtensionFunction;
class ExtensionFunctionDispatcher;
class UIThreadExtensionFunction;
class IOThreadExtensionFunction;
class ListValue;
class QuotaLimitHeuristic;
class RenderViewHost;
namespace base {
class ListValue;
class Value;
}
#define EXTENSION_FUNCTION_VALIDATE(test) do { \
if (!(test)) { \
@ -81,7 +84,7 @@ class ExtensionFunction
std::list<QuotaLimitHeuristic*>* heuristics) const {}
// Specifies the raw arguments to the function, as a JSON value.
virtual void SetArgs(const ListValue* args);
virtual void SetArgs(const base::ListValue* args);
// Retrieves the results of the function as a JSON-encoded string (may
// be empty).
@ -176,11 +179,11 @@ class ExtensionFunction
bool user_gesture_;
// The arguments to the API. Only non-null if argument were specified.
scoped_ptr<ListValue> args_;
scoped_ptr<base::ListValue> args_;
// The result of the API. This should be populated by the derived class before
// SendResponse() is called.
scoped_ptr<Value> result_;
scoped_ptr<base::Value> result_;
// Any detailed error from the API. This should be populated by the derived
// class before Run() returns.

@ -19,7 +19,6 @@ class Browser;
class ChromeRenderMessageFilter;
class Extension;
class ExtensionFunction;
class ListValue;
class Profile;
class RenderViewHost;
class TabContents;

@ -51,8 +51,8 @@ class HistoryFunction : public AsyncExtensionFunction {
virtual void Run();
virtual bool RunImpl() = 0;
bool GetUrlFromValue(Value* value, GURL* url);
bool GetTimeFromValue(Value* value, base::Time* time);
bool GetUrlFromValue(base::Value* value, GURL* url);
bool GetTimeFromValue(base::Value* value, base::Time* time);
};
// Base class for history funciton APIs which require async interaction with

@ -13,7 +13,6 @@
#include "chrome/browser/chromeos/input_method/ibus_ui_controller.h"
#include "chrome/browser/extensions/extension_function.h"
class ListValue;
class Profile;
class ExtensionInputUiEventRouter

@ -14,6 +14,10 @@
#include "chrome/browser/extensions/extension_function.h"
#include "webkit/glue/window_open_disposition.h"
namespace base {
class ListValue;
}
// Event router class for events related to the omnibox API.
class ExtensionOmniboxEventRouter {
public:
@ -61,7 +65,7 @@ struct ExtensionOmniboxSuggestion {
// Converts a list of style ranges from the extension into the format expected
// by the autocomplete system.
bool ReadStylesFromValue(const ListValue& value);
bool ReadStylesFromValue(const base::ListValue& value);
// The text that gets put in the edit box.
string16 content;

@ -72,7 +72,7 @@ class ExtensionPrefValueMap {
void SetExtensionPref(const std::string& ext_id,
const std::string& key,
ExtensionPrefsScope scope,
Value* value);
base::Value* value);
// Remove the extension preference value for |key| of extension |ext_id|.
// Precondition: the extension must be registered.
@ -122,9 +122,9 @@ class ExtensionPrefValueMap {
void RemoveObserver(Observer* observer);
const Value* GetEffectivePrefValue(const std::string& key,
bool incognito,
bool* from_incognito) const;
const base::Value* GetEffectivePrefValue(const std::string& key,
bool incognito,
bool* from_incognito) const;
private:
struct ExtensionEntry;

@ -12,6 +12,10 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "content/common/notification_observer.h"
namespace base {
class Value;
}
class ExtensionPreferenceEventRouter : public NotificationObserver {
public:
explicit ExtensionPreferenceEventRouter(Profile* profile);
@ -39,8 +43,6 @@ class ExtensionPreferenceEventRouter : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(ExtensionPreferenceEventRouter);
};
class Value;
class PrefTransformerInterface {
public:
virtual ~PrefTransformerInterface() {}
@ -51,15 +53,17 @@ class PrefTransformerInterface {
// |error| and returns NULL otherwise. |bad_message| is passed to simulate
// the behavior of EXTENSION_FUNCTION_VALIDATE. It is never NULL.
// The ownership of the returned value is passed to the caller.
virtual Value* ExtensionToBrowserPref(const Value* extension_pref,
std::string* error,
bool* bad_message) = 0;
virtual base::Value* ExtensionToBrowserPref(
const base::Value* extension_pref,
std::string* error,
bool* bad_message) = 0;
// Converts the representation of the preference as stored in the browser
// into a representation that is used by the extension.
// Returns the extension representation in case of success or NULL otherwise.
// The ownership of the returned value is passed to the caller.
virtual Value* BrowserToExtensionPref(const Value* browser_pref) = 0;
virtual base::Value* BrowserToExtensionPref(
const base::Value* browser_pref) = 0;
};
class GetPreferenceFunction : public SyncExtensionFunction {

@ -76,7 +76,7 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
// Returns a copy of the Extensions prefs.
// TODO(erikkay) Remove this so that external consumers don't need to be
// aware of the internal structure of the preferences.
DictionaryValue* CopyCurrentExtensions();
base::DictionaryValue* CopyCurrentExtensions();
// Returns true if the specified external extension was uninstalled by the
// user.
@ -297,7 +297,7 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
void SetExtensionControlledPref(const std::string& extension_id,
const std::string& pref_key,
ExtensionPrefsScope scope,
Value* value);
base::Value* value);
void RemoveExtensionControlledPref(const std::string& extension_id,
const std::string& pref_key,
@ -353,19 +353,19 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
// Converts internal relative paths to be absolute. Used for export to
// consumers who expect full paths.
void MakePathsAbsolute(DictionaryValue* dict);
void MakePathsAbsolute(base::DictionaryValue* dict);
// Sets the pref |key| for extension |id| to |value|.
void UpdateExtensionPref(const std::string& id,
const std::string& key,
Value* value);
base::Value* value);
// Deletes the pref dictionary for extension |id|.
void DeleteExtensionPrefs(const std::string& id);
// Reads a boolean pref from |ext| with key |pref_key|.
// Return false if the value is false or |pref_key| does not exist.
static bool ReadBooleanFromPref(const DictionaryValue* ext,
static bool ReadBooleanFromPref(const base::DictionaryValue* ext,
const std::string& pref_key);
// Reads a boolean pref |pref_key| from extension with id |extension_id|.
@ -374,7 +374,7 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
// Reads an integer pref from |ext| with key |pref_key|.
// Return false if the value does not exist.
static bool ReadIntegerFromPref(const DictionaryValue* ext,
static bool ReadIntegerFromPref(const base::DictionaryValue* ext,
const std::string& pref_key,
int* out_value);
@ -386,7 +386,7 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
// Reads a list pref |pref_key| from extension with id |extension_id|.
bool ReadExtensionPrefList(const std::string& extension_id,
const std::string& pref_key,
const ListValue** out_value);
const base::ListValue** out_value);
// Interprets the list pref, |pref_key| in |extension_id|'s preferences, as a
// URLPatternSet. The |valid_schemes| specify how to parse the URLPatterns.
@ -403,12 +403,12 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
// Returns a dictionary for extension |id|'s prefs or NULL if it doesn't
// exist.
const DictionaryValue* GetExtensionPref(const std::string& id) const;
const base::DictionaryValue* GetExtensionPref(const std::string& id) const;
// Returns the dictionary of preferences controlled by the specified extension
// or creates a new one. All entries in the dictionary contain non-expanded
// paths.
const DictionaryValue* GetExtensionControlledPrefs(
const base::DictionaryValue* GetExtensionControlledPrefs(
const std::string& id,
bool incognito) const;
@ -420,7 +420,7 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
// Checks if kPrefBlacklist is set to true in the DictionaryValue.
// Return false if the value is false or kPrefBlacklist does not exist.
// This is used to decide if an extension is blacklisted.
static bool IsBlacklistBitSet(DictionaryValue* ext);
static bool IsBlacklistBitSet(base::DictionaryValue* ext);
// Fix missing preference entries in the extensions that are were introduced
// in a later Chrome version.

@ -16,9 +16,12 @@
#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/browser/profiles/profile.h"
class Value;
class ExtensionEventRouterForwarder;
namespace base {
class Value;
}
// Class to convert between the representation of proxy settings used
// in the Proxy Settings API and the representation used in the PrefStores.
// This plugs into the ExtensionPreferenceAPI to get and set proxy settings.
@ -28,10 +31,11 @@ class ProxyPrefTransformer : public PrefTransformerInterface {
virtual ~ProxyPrefTransformer();
// Implementation of PrefTransformerInterface.
virtual Value* ExtensionToBrowserPref(const Value* extension_pref,
std::string* error,
bool* bad_message) OVERRIDE;
virtual Value* BrowserToExtensionPref(const Value* browser_pref) OVERRIDE;
virtual base::Value* ExtensionToBrowserPref(const base::Value* extension_pref,
std::string* error,
bool* bad_message) OVERRIDE;
virtual base::Value* BrowserToExtensionPref(
const base::Value* browser_pref) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer);

@ -13,9 +13,12 @@
#include "chrome/browser/prefs/proxy_prefs.h"
#include "net/proxy/proxy_config.h"
class ProxyConfigDictionary;
namespace base {
class DictionaryValue;
class ListValue;
class ProxyConfigDictionary;
}
namespace extension_proxy_api_helpers {
@ -46,27 +49,28 @@ bool CreatePACScriptFromDataURL(
//
// The parameter |bad_message| is passed to simulate the behavior of
// EXTENSION_FUNCTION_VALIDATE. It is never NULL.
bool GetProxyModeFromExtensionPref(const DictionaryValue* proxy_config,
bool GetProxyModeFromExtensionPref(const base::DictionaryValue* proxy_config,
ProxyPrefs::ProxyMode* out,
std::string* error,
bool* bad_message);
bool GetPacMandatoryFromExtensionPref(const DictionaryValue* proxy_config,
bool GetPacMandatoryFromExtensionPref(const base::DictionaryValue* proxy_config,
bool* out,
std::string* error,
bool* bad_message);
bool GetPacUrlFromExtensionPref(const DictionaryValue* proxy_config,
bool GetPacUrlFromExtensionPref(const base::DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message);
bool GetPacDataFromExtensionPref(const DictionaryValue* proxy_config,
bool GetPacDataFromExtensionPref(const base::DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message);
bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message);
bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config,
bool GetProxyRulesStringFromExtensionPref(
const base::DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message);
bool GetBypassListFromExtensionPref(const base::DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message);
@ -74,20 +78,21 @@ bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config,
// Creates and returns a ProxyConfig dictionary (as defined in the extension
// API) from the given parameters. Ownership is passed to the caller.
// Depending on the value of |mode_enum|, several of the strings may be empty.
DictionaryValue* CreateProxyConfigDict(ProxyPrefs::ProxyMode mode_enum,
bool pac_mandatory,
const std::string& pac_url,
const std::string& pac_data,
const std::string& proxy_rules_string,
const std::string& bypass_list,
std::string* error);
base::DictionaryValue* CreateProxyConfigDict(
ProxyPrefs::ProxyMode mode_enum,
bool pac_mandatory,
const std::string& pac_url,
const std::string& pac_data,
const std::string& proxy_rules_string,
const std::string& bypass_list,
std::string* error);
// Converts a ProxyServer dictionary instance (as defined in the extension API)
// |proxy_server| to a net::ProxyServer.
// |default_scheme| is the default scheme that is filled in, in case the
// caller did not pass one.
// Returns true if successful and sets |error| otherwise.
bool GetProxyServer(const DictionaryValue* proxy_server,
bool GetProxyServer(const base::DictionaryValue* proxy_server,
net::ProxyServer::Scheme default_scheme,
net::ProxyServer* out,
std::string* error,
@ -95,7 +100,7 @@ bool GetProxyServer(const DictionaryValue* proxy_server,
// Joins a list of URLs (stored as StringValues) in |list| with |joiner|
// to |out|. Returns true if successful and sets |error| otherwise.
bool JoinUrlList(ListValue* list,
bool JoinUrlList(base::ListValue* list,
const std::string& joiner,
std::string* out,
std::string* error,
@ -107,23 +112,24 @@ bool JoinUrlList(ListValue* list,
// Creates and returns a ProxyRules dictionary as defined in the extension API
// with the values of a ProxyConfigDictionary configured for fixed proxy
// servers. Returns NULL in case of failures. Ownership is passed to the caller.
DictionaryValue* CreateProxyRulesDict(
base::DictionaryValue* CreateProxyRulesDict(
const ProxyConfigDictionary& proxy_config);
// Creates and returns a ProxyServer dictionary as defined in the extension API
// with values from a net::ProxyServer object. Never returns NULL. Ownership is
// passed to the caller.
DictionaryValue* CreateProxyServerDict(const net::ProxyServer& proxy);
base::DictionaryValue* CreateProxyServerDict(const net::ProxyServer& proxy);
// Creates and returns a PacScript dictionary as defined in the extension API
// with the values of a ProxyconfigDictionary configured for pac scripts.
// Returns NULL in case of failures. Ownership is passed to the caller.
DictionaryValue* CreatePacScriptDict(const ProxyConfigDictionary& proxy_config);
base::DictionaryValue* CreatePacScriptDict(
const ProxyConfigDictionary& proxy_config);
// Tokenizes the |in| at delimiters |delims| and returns a new ListValue with
// StringValues created from the tokens. Ownership is passed to the caller.
ListValue* TokenizeToStringList(const std::string& in,
const std::string& delims);
base::ListValue* TokenizeToStringList(const std::string& in,
const std::string& delims);
} // namespace extension_proxy_api_helpers

@ -8,11 +8,14 @@
#include <string>
#include "chrome/browser/extensions/extension_function.h"
class DictionaryValue;
class Profile;
class RenderViewHost;
class TabContents;
namespace base {
class DictionaryValue;
}
namespace extension_sidebar_constants {
extern const char kActiveState[];
extern const char kHiddenState[];
@ -38,14 +41,14 @@ class SidebarFunction : public SyncExtensionFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details) = 0;
const base::DictionaryValue& details) = 0;
};
class CollapseSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.collapse");
};
@ -53,7 +56,7 @@ class ExpandSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.expand");
};
@ -61,7 +64,7 @@ class GetStateSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.getState");
};
@ -69,7 +72,7 @@ class HideSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.hide");
};
@ -77,7 +80,7 @@ class NavigateSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.navigate");
};
@ -85,7 +88,7 @@ class SetBadgeTextSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.setBadgeText");
};
@ -93,7 +96,7 @@ class SetIconSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.setIcon");
};
@ -101,7 +104,7 @@ class SetTitleSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.setTitle");
};
@ -109,9 +112,8 @@ class ShowSidebarFunction : public SidebarFunction {
private:
virtual bool RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details);
const base::DictionaryValue& details);
DECLARE_EXTENSION_FUNCTION_NAME("experimental.sidebar.show");
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SIDEBAR_API_H_

@ -15,28 +15,31 @@
class BackingStore;
class Browser;
class DictionaryValue;
class ListValue;
class SkBitmap;
class TabContents;
class TabContentsWrapper;
class TabStripModel;
namespace base {
class DictionaryValue;
class ListValue;
}
namespace ExtensionTabUtil {
int GetWindowId(const Browser* browser);
int GetTabId(const TabContents* tab_contents);
std::string GetTabStatusText(bool is_loading);
int GetWindowIdOfTab(const TabContents* tab_contents);
ListValue* CreateTabList(const Browser* browser);
DictionaryValue* CreateTabValue(const TabContents* tab_contents);
DictionaryValue* CreateTabValue(const TabContents* tab_contents,
TabStripModel* tab_strip,
int tab_index);
base::ListValue* CreateTabList(const Browser* browser);
base::DictionaryValue* CreateTabValue(const TabContents* tab_contents);
base::DictionaryValue* CreateTabValue(const TabContents* tab_contents,
TabStripModel* tab_strip,
int tab_index);
// Create a tab value, overriding its kSelectedKey to the provided boolean.
DictionaryValue* CreateTabValueActive(const TabContents* tab_contents,
bool active);
DictionaryValue* CreateWindowValue(const Browser* browser,
bool populate_tabs);
base::DictionaryValue* CreateTabValueActive(const TabContents* tab_contents,
bool active);
base::DictionaryValue* CreateWindowValue(const Browser* browser,
bool populate_tabs);
// Gets the |tab_strip_model| and |tab_index| for the given |tab_contents|.
bool GetTabStripModel(const TabContents* tab_contents,
TabStripModel** tab_strip_model,

@ -13,13 +13,15 @@
#include "base/scoped_ptr.h"
#include "googleurl/src/gurl.h"
class DictionaryValue;
class Extension;
class ExtensionTtsPlatformImpl;
class ListValue;
class Profile;
class Value;
namespace base {
class DictionaryValue;
class ListValue;
class Value;
}
// Events sent back from the TTS engine indicating the progress.
enum TtsEventType {
@ -67,8 +69,8 @@ class Utterance {
void set_text(const std::string& text) { text_ = text; }
const std::string& text() const { return text_; }
void set_options(const Value* options);
const Value* options() const { return options_.get(); }
void set_options(const base::Value* options);
const base::Value* options() const { return options_.get(); }
void set_src_extension_id(const std::string& src_extension_id) {
src_extension_id_ = src_extension_id;
@ -151,7 +153,7 @@ class Utterance {
// The full options arg passed to tts.speak, which may include fields
// other than the ones we explicitly parse, below.
scoped_ptr<Value> options_;
scoped_ptr<base::Value> options_;
// The extension ID of the extension that called speak() and should
// receive events.
@ -212,7 +214,7 @@ class ExtensionTtsController {
// Return a list of all available voices, including the native voice,
// if supported, and all voices registered by extensions.
ListValue* GetVoices(Profile* profile);
base::ListValue* GetVoices(Profile* profile);
// For unit testing.
void SetPlatformImpl(ExtensionTtsPlatformImpl* platform_impl);

@ -11,8 +11,12 @@
class Extension;
class Utterance;
namespace base {
class ListValue;
}
// Return a list of all available voices registered by extensions.
void GetExtensionVoices(Profile* profile, ListValue* result_voices);
void GetExtensionVoices(Profile* profile, base::ListValue* result_voices);
// Find the first extension with a tts_voices in its
// manifest that matches the speech parameters of this utterance.

@ -15,12 +15,16 @@
#include "chrome/common/extensions/extension.h"
class GURL;
class ListValue;
class PrefService;
class Profile;
class RenderViewHost;
class TabContents;
namespace base {
class ListValue;
class Value;
}
// This class implements WebUI for extensions and allows extensions to put UI in
// the main tab contents area. For example, each extension can specify an
// "options_page", and that page is displayed in the tab contents area and is
@ -49,7 +53,7 @@ class ExtensionWebUI : public ChromeWebUI {
const Extension::URLOverrideMap& overrides);
static void UnregisterChromeURLOverride(const std::string& page,
Profile* profile,
Value* override);
base::Value* override);
// Called from BrowserPrefs
static void RegisterUserPrefs(PrefService* prefs);
@ -64,8 +68,8 @@ class ExtensionWebUI : public ChromeWebUI {
// ensure that something takes its place.
static void UnregisterAndReplaceOverride(const std::string& page,
Profile* profile,
ListValue* list,
Value* override);
base::ListValue* list,
base::Value* override);
// TODO(aa): This seems out of place. Why is it not with the event routers for
// the other extension APIs?

@ -20,11 +20,14 @@
#include "net/base/completion_callback.h"
#include "webkit/glue/resource_type.h"
class DictionaryValue;
class ExtensionInfoMap;
class GURL;
namespace base {
class DictionaryValue;
class ListValue;
class StringValue;
}
namespace net {
class HostPortPair;
@ -63,7 +66,7 @@ class ExtensionWebRequestEventRouter {
// Returns false if there was an error initializing. If it is a user error,
// an error message is provided, otherwise the error is internal (and
// unexpected).
bool InitFromValue(const DictionaryValue& value, std::string* error);
bool InitFromValue(const base::DictionaryValue& value, std::string* error);
};
// Internal representation of the extraInfoSpec parameter on webRequest
@ -78,7 +81,8 @@ class ExtensionWebRequestEventRouter {
BLOCKING = 1<<4,
};
static bool InitFromValue(const ListValue& value, int* extra_info_spec);
static bool InitFromValue(const base::ListValue& value,
int* extra_info_spec);
};
// Contains an extension's response to a blocking event.
@ -215,7 +219,7 @@ class ExtensionWebRequestEventRouter {
ProfileId profile_id,
net::URLRequest* request,
const std::vector<const EventListener*>& listeners,
const ListValue& args);
const base::ListValue& args);
// Returns a list of event listeners that care about the given event, based
// on their filter parameters. |extra_info_spec| will contain the combined

@ -84,7 +84,8 @@ class BeginInstallWithManifestFunction : public AsyncExtensionFunction,
// Called when we've successfully parsed the manifest and icon data in the
// utility process. Ownership of parsed_manifest is transferred.
void OnParseSuccess(const SkBitmap& icon, DictionaryValue* parsed_manifest);
void OnParseSuccess(const SkBitmap& icon,
base::DictionaryValue* parsed_manifest);
// Called to indicate a parse failure. The |result_code| parameter should
// indicate whether the problem was with the manifest or icon data.
@ -109,7 +110,7 @@ class BeginInstallWithManifestFunction : public AsyncExtensionFunction,
std::string localized_name_;
// The results of parsing manifest_ and icon_data_ go into these two.
scoped_ptr<DictionaryValue> parsed_manifest_;
scoped_ptr<base::DictionaryValue> parsed_manifest_;
SkBitmap icon_;
// A dummy Extension object we create for the purposes of using

@ -20,15 +20,18 @@
#include "content/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
class DictionaryValue;
class Extension;
class ExtensionService;
class FilePath;
class ListValue;
class PrefService;
class RenderProcessHost;
class UserScript;
namespace base {
class DictionaryValue;
class ListValue;
}
// Information about a page running in an extension, for example a toolstrip,
// a background page, or a tab contents.
struct ExtensionPage {
@ -74,7 +77,7 @@ class ExtensionsDOMHandler : public WebUIMessageHandler,
// Extension Detail JSON Struct for page. (static for ease of testing).
// Note: service can be NULL in unit tests.
static DictionaryValue* CreateExtensionDetailValue(
static base::DictionaryValue* CreateExtensionDetailValue(
ExtensionService* service,
const Extension* extension,
const std::vector<ExtensionPage>& pages,
@ -93,52 +96,52 @@ class ExtensionsDOMHandler : public WebUIMessageHandler,
private:
// Callback for "requestExtensionsData" message.
void HandleRequestExtensionsData(const ListValue* args);
void HandleRequestExtensionsData(const base::ListValue* args);
// Callback for "toggleDeveloperMode" message.
void HandleToggleDeveloperMode(const ListValue* args);
void HandleToggleDeveloperMode(const base::ListValue* args);
// Callback for "inspect" message.
void HandleInspectMessage(const ListValue* args);
void HandleInspectMessage(const base::ListValue* args);
// Callback for "reload" message.
void HandleReloadMessage(const ListValue* args);
void HandleReloadMessage(const base::ListValue* args);
// Callback for "enable" message.
void HandleEnableMessage(const ListValue* args);
void HandleEnableMessage(const base::ListValue* args);
// Callback for "enableIncognito" message.
void HandleEnableIncognitoMessage(const ListValue* args);
void HandleEnableIncognitoMessage(const base::ListValue* args);
// Callback for "allowFileAcces" message.
void HandleAllowFileAccessMessage(const ListValue* args);
void HandleAllowFileAccessMessage(const base::ListValue* args);
// Callback for "uninstall" message.
void HandleUninstallMessage(const ListValue* args);
void HandleUninstallMessage(const base::ListValue* args);
// Callback for "options" message.
void HandleOptionsMessage(const ListValue* args);
void HandleOptionsMessage(const base::ListValue* args);
// Callback for "showButton" message.
void HandleShowButtonMessage(const ListValue* args);
void HandleShowButtonMessage(const base::ListValue* args);
// Callback for "load" message.
void HandleLoadMessage(const ListValue* args);
void HandleLoadMessage(const base::ListValue* args);
// Callback for "pack" message.
void HandlePackMessage(const ListValue* args);
void HandlePackMessage(const base::ListValue* args);
// Callback for "autoupdate" message.
void HandleAutoUpdateMessage(const ListValue* args);
void HandleAutoUpdateMessage(const base::ListValue* args);
// Utility for calling javascript window.alert in the page.
void ShowAlert(const std::string& message);
// Callback for "selectFilePath" message.
void HandleSelectFilePathMessage(const ListValue* args);
void HandleSelectFilePathMessage(const base::ListValue* args);
// Utility for callbacks that get an extension ID as the sole argument.
const Extension* GetExtension(const ListValue* args);
const Extension* GetExtension(const base::ListValue* args);
// Forces a UI update if appropriate after a notification is received.
void MaybeUpdateAfterNotification();

@ -10,9 +10,12 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
class DictionaryValue;
class ExternalExtensionProviderImpl;
namespace base {
class DictionaryValue;
}
// Base class for gathering a list of external extensions. Subclasses
// implement loading from registry, JSON file, policy.
// Instances are owned by ExternalExtensionProviderImpl objects.
@ -62,7 +65,7 @@ class ExternalExtensionLoader
// this task should invoke |LoadFinished| with a PostTask. This scheme of
// posting tasks will avoid concurrent access and imply the necessary memory
// barriers.
scoped_ptr<DictionaryValue> prefs_;
scoped_ptr<base::DictionaryValue> prefs_;
private:
friend class base::RefCountedThreadSafe<ExternalExtensionLoader>;

@ -11,12 +11,15 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/extensions/external_extension_loader.h"
class DictionaryValue;
class ExternalExtensionLoader;
class Profile;
class ValueSerializer;
class Version;
namespace base {
class DictionaryValue;
class ValueSerializer;
}
// A specialization of the ExternalExtensionProvider that uses an instance
// of ExternalExtensionLoader to provide external extensions. This class
// can be seen as a bridge between the extension system and an
@ -47,7 +50,7 @@ class ExternalExtensionProviderImpl
// Sets underlying prefs and notifies provider. Only to be called by the
// owned ExternalExtensionLoader instance.
void SetPrefs(DictionaryValue* prefs);
void SetPrefs(base::DictionaryValue* prefs);
// ExternalExtensionProvider implementation:
virtual void VisitRegisteredExtension() const;
@ -83,7 +86,7 @@ class ExternalExtensionProviderImpl
VisitorInterface* service_; // weak
// Dictionary of the external extensions that are provided by this provider.
scoped_ptr<DictionaryValue> prefs_;
scoped_ptr<base::DictionaryValue> prefs_;
// Indicates that the extensions provided by this provider are loaded
// entirely.

@ -12,7 +12,6 @@
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
class ListValue;
class MockExternalPolicyExtensionProviderVisitor;
class Profile;

@ -13,10 +13,13 @@
#include "base/scoped_temp_dir.h"
#include "content/browser/utility_process_host.h"
class DictionaryValue;
class Extension;
class ResourceDispatcherHost;
namespace base {
class DictionaryValue;
}
class SandboxedExtensionUnpackerClient
: public base::RefCountedThreadSafe<SandboxedExtensionUnpackerClient> {
public:
@ -32,7 +35,7 @@ class SandboxedExtensionUnpackerClient
// for deleting this memory.
virtual void OnUnpackSuccess(const FilePath& temp_dir,
const FilePath& extension_root,
const DictionaryValue* original_manifest,
const base::DictionaryValue* original_manifest,
const Extension* extension) = 0;
virtual void OnUnpackFailure(const std::string& error) = 0;
@ -192,15 +195,16 @@ class SandboxedExtensionUnpacker : public UtilityProcessHost::Client {
virtual void OnProcessCrashed(int exit_code);
// IPC message handlers.
void OnUnpackExtensionSucceeded(const DictionaryValue& manifest);
void OnUnpackExtensionSucceeded(const base::DictionaryValue& manifest);
void OnUnpackExtensionFailed(const std::string& error_message);
void ReportFailure(FailureReason reason, const std::string& message);
void ReportSuccess(const DictionaryValue& original_manifest);
void ReportSuccess(const base::DictionaryValue& original_manifest);
// Overwrites original manifest with safe result from utility process.
// Returns NULL on error. Caller owns the returned object.
DictionaryValue* RewriteManifestFile(const DictionaryValue& manifest);
base::DictionaryValue* RewriteManifestFile(
const base::DictionaryValue& manifest);
// Overwrites original files with safe results from utility process.
// Reports error and returns false if it fails.

@ -8,6 +8,7 @@
#include "base/scoped_temp_dir.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"

@ -12,11 +12,14 @@
#include "base/scoped_temp_dir.h"
#include "chrome/common/extensions/extension.h"
class DictionaryValue;
class ExtensionPrefs;
class ExtensionPrefValueMap;
class PrefService;
namespace base {
class DictionaryValue;
}
// This is a test class intended to make it easier to work with ExtensionPrefs
// in tests.
class TestExtensionPrefs {
@ -39,7 +42,7 @@ class TestExtensionPrefs {
// Similar to AddExtension, but takes a dictionary with manifest values.
scoped_refptr<Extension> AddExtensionWithManifest(
const DictionaryValue& manifest, Extension::Location location);
const base::DictionaryValue& manifest, Extension::Location location);
// Similar to AddExtension, this adds a new test Extension. This is useful for
// cases when you don't need the Extension object, but just the id it was

@ -8,10 +8,13 @@
#include <string>
class DictionaryValue;
class GURL;
class PrefService;
namespace base {
class DictionaryValue;
}
class ExternalProtocolHandler {
public:
enum BlockState {
@ -66,7 +69,7 @@ class ExternalProtocolHandler {
// Prepopulates the dictionary with known protocols to deny or allow, if
// preferences for them do not already exist.
static void PrepopulateDictionary(DictionaryValue* win_pref);
static void PrepopulateDictionary(base::DictionaryValue* win_pref);
// Allows LaunchUrl to proceed with launching an external protocol handler.
// This is typically triggered by a user gesture, but is also called for

@ -24,10 +24,13 @@
#include "googleurl/src/gurl.h"
class ContentSettingsDetails;
class DictionaryValue;
class PrefService;
class Profile;
namespace base {
class DictionaryValue;
}
class GeolocationContentSettingsMap
: public base::RefCountedThreadSafe<GeolocationContentSettingsMap>,
public NotificationObserver {
@ -109,7 +112,7 @@ class GeolocationContentSettingsMap
// Sets the fields of |one_origin_settings| based on the values in
// |dictionary|.
static void GetOneOriginSettingsFromDictionary(
const DictionaryValue* dictionary,
const base::DictionaryValue* dictionary,
OneOriginSettings* one_origin_settings);
// The profile we're associated with.

@ -25,11 +25,14 @@
#include "content/browser/cancelable_request.h"
#include "googleurl/src/gurl.h"
class DictionaryValue;
class FilePath;
class SkBitmap;
class Profile;
namespace base {
class DictionaryValue;
}
namespace history {
class TopSitesCache;
@ -361,12 +364,12 @@ class TopSites
// storing all URLs, but filtering on access. It is a dictionary,
// key is the URL, value is a dummy value. This is owned by the
// PrefService.
const DictionaryValue* blacklist_;
const base::DictionaryValue* blacklist_;
// This is a dictionary for the pinned URLs for the the most visited part of
// the new tab page. Key is the URL, value is index where it is pinned at (may
// be the same as key). This is owned by the PrefService.
const DictionaryValue* pinned_urls_;
const base::DictionaryValue* pinned_urls_;
// See description above HistoryLoadState.
HistoryLoadState history_state_;

@ -14,10 +14,13 @@
#include "chrome/browser/importer/importer_bridge.h"
#include "chrome/browser/importer/profile_writer.h"
class DictionaryValue;
class GURL;
class ProfileImportThread;
namespace base {
class DictionaryValue;
}
// When the importer is run in an external process, the bridge is effectively
// split in half by the IPC infrastructure. The external bridge receives data
// and notifications from the importer, and sends it across IPC. The
@ -26,7 +29,7 @@ class ProfileImportThread;
class ExternalProcessImporterBridge : public ImporterBridge {
public:
ExternalProcessImporterBridge(ProfileImportThread* profile_import_thread,
const DictionaryValue& localized_strings);
const base::DictionaryValue& localized_strings);
// Begin ImporterBridge implementation:
virtual void AddBookmarks(
@ -68,7 +71,7 @@ class ExternalProcessImporterBridge : public ImporterBridge {
// Holds strings needed by the external importer because the resource
// bundle isn't available to the external process.
scoped_ptr<DictionaryValue> localized_strings_;
scoped_ptr<base::DictionaryValue> localized_strings_;
DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterBridge);
};

@ -12,11 +12,14 @@
#include "base/basictypes.h"
#include "build/build_config.h"
class DictionaryValue;
class FilePath;
class GURL;
class TemplateURL;
namespace base {
class DictionaryValue;
}
#if defined(OS_WIN)
// Detects which version of Firefox is installed from registry. Returns its
// major version, and drops the minor version. Returns 0 if failed. If there are
@ -62,7 +65,7 @@ FilePath GetProfilesINI();
// Path=Profiles/abcdefeg.default
// We set "[value]" in path "<Section>.<Key>". For example, the path
// "Genenral.StartWithLastProfile" has the value "1".
void ParseProfileINI(const FilePath& file, DictionaryValue* root);
void ParseProfileINI(const FilePath& file, base::DictionaryValue* root);
// Returns true if we want to add the URL to the history. We filter out the URL
// with a unsupported scheme.
@ -93,7 +96,7 @@ bool IsDefaultHomepage(const GURL& homepage, const FilePath& app_path);
// |prefs| is not filled).
// Note: for strings, only valid UTF-8 string values are supported. If a
// key/pair is not valid UTF-8, it is ignored and will not appear in |prefs|.
bool ParsePrefFile(const FilePath& pref_file, DictionaryValue* prefs);
bool ParsePrefFile(const FilePath& pref_file, base::DictionaryValue* prefs);
// Parses the value of a particular firefox preference from a string that is the
// contents of the prefs file.

@ -21,12 +21,15 @@
class ChromeNetLog;
class ChromeURLRequestContextGetter;
class ExtensionEventRouterForwarder;
class ListValue;
class MediaInternals;
class PrefProxyConfigTracker;
class PrefService;
class SystemURLRequestContextGetter;
namespace base {
class ListValue;
}
namespace chrome_browser_net {
class ConnectInterceptor;
class Predictor;
@ -111,7 +114,7 @@ class IOThread : public BrowserProcessSubThread {
base::TimeDelta max_dns_queue_delay,
size_t max_speculative_parallel_resolves,
const chrome_common_net::UrlList& startup_urls,
ListValue* referral_list,
base::ListValue* referral_list,
bool preconnect_enabled);
// Registers |url_request_context_getter| into the IO thread. During
@ -165,7 +168,7 @@ class IOThread : public BrowserProcessSubThread {
base::TimeDelta max_dns_queue_delay,
size_t max_speculative_parallel_resolves,
const chrome_common_net::UrlList& startup_urls,
ListValue* referral_list,
base::ListValue* referral_list,
bool preconnect_enabled);
void ChangedToOnTheRecordOnIOThread();

@ -14,10 +14,13 @@
#include "content/common/page_transition_types.h"
struct AutocompleteLog;
class DictionaryValue;
class GURL;
class PrefService;
namespace base {
class DictionaryValue;
}
namespace webkit {
namespace npapi {
struct WebPluginInfo;
@ -42,7 +45,7 @@ class MetricsLog : public MetricsLogBase {
// dictionary giving the metrics for the profile.
void RecordEnvironment(
const std::vector<webkit::npapi::WebPluginInfo>& plugin_list,
const DictionaryValue* profile_metrics);
const base::DictionaryValue* profile_metrics);
// Records the input text, available choices, and selected entry when the
// user uses the Omnibox to open a URL.
@ -96,12 +99,13 @@ class MetricsLog : public MetricsLogBase {
// Writes all profile metrics. This invokes WriteProfileMetrics for each key
// in all_profiles_metrics that starts with kProfilePrefix.
void WriteAllProfilesMetrics(const DictionaryValue& all_profiles_metrics);
void WriteAllProfilesMetrics(
const base::DictionaryValue& all_profiles_metrics);
// Writes metrics for the profile identified by key. This writes all
// key/value pairs in profile_metrics.
void WriteProfileMetrics(const std::string& key,
const DictionaryValue& profile_metrics);
const base::DictionaryValue& profile_metrics);
DISALLOW_COPY_AND_ASSIGN(MetricsLog);
};

@ -28,14 +28,17 @@
class BookmarkModel;
class BookmarkNode;
class DictionaryValue;
class ListValue;
class HistogramSynchronizer;
class MetricsLogBase;
class MetricsReportingScheduler;
class PrefService;
class TemplateURLService;
namespace base {
class DictionaryValue;
class ListValue;
}
namespace webkit {
namespace npapi {
struct WebPluginInfo;
@ -237,12 +240,12 @@ class MetricsService : public NotificationObserver,
void RecallUnsentLogs();
// Decode and verify written pref log data.
static MetricsService::LogRecallStatus RecallUnsentLogsHelper(
const ListValue& list,
const base::ListValue& list,
std::vector<std::string>* local_list);
// Encode and write list size and checksum for perf log data.
static void StoreUnsentLogsHelper(const std::vector<std::string>& local_list,
const size_t kMaxLocalListSize,
ListValue* list);
base::ListValue* list);
// Convert |pending_log_| to XML in |compressed_log_|, and compress it for
// transmission.
void PreparePendingLogText();
@ -406,7 +409,7 @@ class MetricsService : public NotificationObserver,
// Dictionary containing all the profile specific metrics. This is set
// at creation time from the prefs.
scoped_ptr<DictionaryValue> profile_dictionary_;
scoped_ptr<base::DictionaryValue> profile_dictionary_;
// The scheduler for determining when uploads should happen.
scoped_ptr<MetricsReportingScheduler> scheduler_;

@ -33,7 +33,9 @@
#include "chrome/common/net/predictor_common.h"
#include "net/base/host_port_pair.h"
namespace base {
class ListValue;
}
namespace net {
class HostResolver;
@ -113,14 +115,14 @@ class Predictor : public base::RefCountedThreadSafe<Predictor> {
// Construct a ListValue object that contains all the data in the referrers_
// so that it can be persisted in a pref.
void SerializeReferrers(ListValue* referral_list);
void SerializeReferrers(base::ListValue* referral_list);
// Process a ListValue that contains all the data from a previous reference
// list, as constructed by SerializeReferrers(), and add all the identified
// values into the current referrer list.
void DeserializeReferrers(const ListValue& referral_list);
void DeserializeReferrers(const base::ListValue& referral_list);
void DeserializeReferrersThenDelete(ListValue* referral_list);
void DeserializeReferrersThenDelete(base::ListValue* referral_list);
// For unit test code only.
size_t max_concurrent_dns_lookups() const {

@ -32,7 +32,7 @@ namespace chrome_browser_net {
void FinalizePredictorInitialization(
Predictor* global_predictor,
const std::vector<GURL>& urls_to_prefetch,
ListValue* referral_list);
base::ListValue* referral_list);
// Free all resources allocated by FinalizePredictorInitialization. After that
// you must not call any function from this file.

@ -24,7 +24,9 @@
#include "googleurl/src/gurl.h"
#include "net/base/host_port_pair.h"
namespace base {
class Value;
}
namespace chrome_browser_net {
@ -115,8 +117,8 @@ class Referrer : public SubresourceMap {
bool Trim(double reduce_rate, double threshold);
// Provide methods for persisting, and restoring contents into a Value class.
Value* Serialize() const;
void Deserialize(const Value& referrers);
base::Value* Serialize() const;
void Deserialize(const base::Value& referrers);
private:
// Helper function for pruning list. Metric for usefulness is "large accrued

@ -8,8 +8,6 @@
#include <vector>
class Value;
struct WinsockNamespaceProvider {
std::wstring name;
int version;
@ -38,4 +36,3 @@ void GetWinsockLayeredServiceProviders(
WinsockLayeredServiceProviderList* service_list);
#endif // CHROME_BROWSER_NET_SERVICE_PROVIDERS_WIN_H_

@ -14,7 +14,9 @@
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h"
namespace base {
class ListValue;
}
// Class which caches notification preferences.
// Construction occurs on the UI thread when the contents
@ -45,7 +47,7 @@ class NotificationsPrefsCache
void SetCacheDeniedOrigins(const std::vector<GURL>& denied);
void SetCacheDefaultContentSetting(ContentSetting setting);
static void ListValueToGurlVector(const ListValue& origin_list,
static void ListValueToGurlVector(const base::ListValue& origin_list,
std::vector<GURL>* origin_vector);
// Exposed for testing.

@ -15,12 +15,15 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "content/common/notification_observer.h"
class DictionaryValue;
class ListValue;
class NotificationDetails;
class NotificationSource;
class Profile;
namespace base {
class DictionaryValue;
class ListValue;
}
namespace webkit {
namespace npapi {
class PluginGroup;
@ -32,7 +35,7 @@ class PluginUpdater : public NotificationObserver {
public:
// Get a list of all the plugin groups. The caller should take ownership
// of the returned ListValue.
static ListValue* GetPluginGroupsData();
static base::ListValue* GetPluginGroupsData();
// Enable or disable a plugin group.
void EnablePluginGroup(bool enable, const string16& group_name);
@ -80,18 +83,19 @@ class PluginUpdater : public NotificationObserver {
// Used for the post task to notify that plugin enabled status changed.
static void OnNotifyPluginStatusChanged();
static DictionaryValue* CreatePluginFileSummary(
static base::DictionaryValue* CreatePluginFileSummary(
const webkit::npapi::WebPluginInfo& plugin);
// Force plugins to be enabled or disabled due to policy.
// |disabled_list| contains the list of StringValues of the names of the
// policy-disabled plugins, |exceptions_list| the policy-allowed plugins,
// and |enabled_list| the policy-enabled plugins.
void UpdatePluginsStateFromPolicy(const ListValue* disabled_list,
const ListValue* exceptions_list,
const ListValue* enabled_list);
void UpdatePluginsStateFromPolicy(const base::ListValue* disabled_list,
const base::ListValue* exceptions_list,
const base::ListValue* enabled_list);
void ListValueToStringSet(const ListValue* src, std::set<string16>* dest);
void ListValueToStringSet(const base::ListValue* src,
std::set<string16>* dest);
// Needed to allow singleton instantiation using private constructor.
friend struct DefaultSingletonTraits<PluginUpdater>;

@ -9,7 +9,9 @@
#include "base/basictypes.h"
#include "policy/configuration_policy_type.h"
namespace base {
class Value;
}
namespace policy {
@ -40,7 +42,7 @@ class ConfigurationPolicyStoreInterface {
// A |ConfigurationPolicyProvider| specifies the value of a policy
// setting through a call to |Apply|. The configuration policy pref
// store takes over the ownership of |value|.
virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0;
virtual void Apply(ConfigurationPolicyType policy, base::Value* value) = 0;
protected:
ConfigurationPolicyStoreInterface() {}

@ -12,8 +12,6 @@
#include "base/values.h"
#include "chrome/browser/prefs/value_map_pref_store.h"
class DictionaryValue;
// This PrefStore keeps track of preferences set by command-line switches,
// such as proxy settings.
class CommandLinePrefStore : public ValueMapPrefStore {

@ -34,12 +34,13 @@ class OverlayPersistentPrefStore : public PersistentPrefStore,
virtual void RemoveObserver(PrefStore::Observer* observer);
virtual bool IsInitializationComplete() const;
virtual ReadResult GetValue(const std::string& key,
const Value** result) const;
const base::Value** result) const;
// Methods of PersistentPrefStore.
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();

@ -47,7 +47,7 @@ class PrefMemberBase : public NotificationObserver {
// Update the value, either by calling |UpdateValueInternal| directly
// or by dispatching to the right thread.
// Takes ownership of |value|.
virtual void UpdateValue(Value* value, bool is_managed) const;
virtual void UpdateValue(base::Value* value, bool is_managed) const;
void MoveToThread(BrowserThread::ID thread_id);
@ -67,7 +67,7 @@ class PrefMemberBase : public NotificationObserver {
private:
// This method actually updates the value. It should only be called from
// the thread the PrefMember is on.
virtual bool UpdateValueInternal(const Value& value) const = 0;
virtual bool UpdateValueInternal(const base::Value& value) const = 0;
bool IsOnCorrectThread() const;
@ -217,7 +217,7 @@ class PrefMember : public subtle::PrefMemberBase {
protected:
virtual ~Internal() {}
virtual bool UpdateValueInternal(const Value& value) const;
virtual bool UpdateValueInternal(const base::Value& value) const;
// We cache the value of the pref so we don't have to keep walking the pref
// tree.

@ -21,7 +21,9 @@ namespace sync_pb {
class PreferenceSpecifics;
}
namespace base {
class Value;
}
// Contains all preference sync related logic.
// TODO(sync): Merge this into PrefService once we separate the profile
@ -66,17 +68,18 @@ class PrefModelAssociator
// value always takes precedence. Note that only certain preferences will
// actually be merged, all others will return a copy of the server value. See
// the method's implementation for details.
static Value* MergePreference(const PrefService::Preference& local_pref,
const Value& server_value);
static base::Value* MergePreference(
const PrefService::Preference& local_pref,
const base::Value& server_value);
// Fills |sync_data| with a sync representation of the preference data
// provided.
static bool CreatePrefSyncData(const std::string& name,
const Value& value,
const base::Value& value,
SyncData* sync_data);
// Extract preference value and name from sync specifics.
Value* ReadPreferenceSpecifics(
base::Value* ReadPreferenceSpecifics(
const sync_pb::PreferenceSpecifics& specifics,
std::string* name);
@ -104,9 +107,10 @@ class PrefModelAssociator
// preference has been updated.
void SendUpdateNotificationsIfNecessary(const std::string& pref_name);
static Value* MergeListValues(const Value& from_value, const Value& to_value);
static Value* MergeDictionaryValues(const Value& from_value,
const Value& to_value);
static base::Value* MergeListValues(
const base::Value& from_value, const base::Value& to_value);
static base::Value* MergeDictionaryValues(const base::Value& from_value,
const base::Value& to_value);
// Do we have an active association between the preferences and sync models?
// Set when start syncing, reset in StopSyncing. While this is not set, we

@ -56,7 +56,7 @@ class PrefService : public base::NonThreadSafe {
// your own; use the PrefService::Register*Pref methods instead.
Preference(const PrefService* service,
const char* name,
Value::ValueType type);
base::Value::ValueType type);
~Preference() {}
// Returns the name of the Preference (i.e., the key, e.g.,
@ -64,11 +64,11 @@ class PrefService : public base::NonThreadSafe {
const std::string name() const { return name_; }
// Returns the registered type of the preference.
Value::ValueType GetType() const;
base::Value::ValueType GetType() const;
// Returns the value of the Preference, falling back to the registered
// default value if no other has been set.
const Value* GetValue() const;
const base::Value* GetValue() const;
// Returns true if the Preference is managed, i.e. set by an admin policy.
// Since managed prefs have the highest priority, this also indicates
@ -115,7 +115,7 @@ class PrefService : public base::NonThreadSafe {
std::string name_;
Value::ValueType type_;
base::Value::ValueType type_;
// Reference to the PrefService in which this pref was created.
const PrefService* pref_service_;
@ -178,8 +178,10 @@ class PrefService : public base::NonThreadSafe {
void RegisterListPref(const char* path);
void RegisterDictionaryPref(const char* path);
// These take ownership of the default_value:
void RegisterListPref(const char* path, ListValue* default_value);
void RegisterDictionaryPref(const char* path, DictionaryValue* default_value);
void RegisterListPref(const char* path,
base::ListValue* default_value);
void RegisterDictionaryPref(const char* path,
base::DictionaryValue* default_value);
// These variants use a default value from the locale dll instead.
void RegisterLocalizedBooleanPref(const char* path,
int locale_default_message_id);
@ -213,10 +215,10 @@ class PrefService : public base::NonThreadSafe {
void RegisterDictionaryPref(const char* path, PrefSyncStatus sync_status);
// These take ownership of the default_value:
void RegisterListPref(const char* path,
ListValue* default_value,
base::ListValue* default_value,
PrefSyncStatus sync_status);
void RegisterDictionaryPref(const char* path,
DictionaryValue* default_value,
base::DictionaryValue* default_value,
PrefSyncStatus sync_status);
// These variants use a default value from the locale dll instead.
void RegisterLocalizedBooleanPref(const char* path,
@ -247,8 +249,8 @@ class PrefService : public base::NonThreadSafe {
// Returns the branch if it exists, or the registered default value otherwise.
// Note that |path| must point to a registered preference. In that case, these
// functions will never return NULL.
const DictionaryValue* GetDictionary(const char* path) const;
const ListValue* GetList(const char* path) const;
const base::DictionaryValue* GetDictionary(const char* path) const;
const base::ListValue* GetList(const char* path) const;
// Removes a user pref and restores the pref to its default value.
void ClearPref(const char* path);
@ -258,7 +260,7 @@ class PrefService : public base::NonThreadSafe {
// To set the value of dictionary or list values in the pref tree use
// Set(), but to modify the value of a dictionary or list use either
// ListPrefUpdate or DictionaryPrefUpdate from scoped_user_pref_update.h.
void Set(const char* path, const Value& value);
void Set(const char* path, const base::Value& value);
void SetBoolean(const char* path, bool value);
void SetInteger(const char* path, int value);
void SetDouble(const char* path, double value);
@ -279,7 +281,7 @@ class PrefService : public base::NonThreadSafe {
// Returns a dictionary with effective preference values. The ownership
// is passed to the caller.
DictionaryValue* GetPreferenceValues() const;
base::DictionaryValue* GetPreferenceValues() const;
// A helper method to quickly look up a preference. Returns NULL if the
// preference is not registered.
@ -354,12 +356,12 @@ class PrefService : public base::NonThreadSafe {
// RegisterPreference must not be called twice for the same path.
// This method takes ownership of |default_value|.
void RegisterPreference(const char* path,
Value* default_value,
base::Value* default_value,
PrefSyncStatus sync_status);
// Sets the value for this pref path in the user pref store and informs the
// PrefNotifier of the change.
void SetUserPrefValue(const char* path, Value* new_value);
void SetUserPrefValue(const char* path, base::Value* new_value);
// Load preferences from storage, attempting to diagnose and handle errors.
// This should only be called from the constructor.
@ -372,7 +374,8 @@ class PrefService : public base::NonThreadSafe {
// |type| may only be Values::TYPE_DICTIONARY or Values::TYPE_LIST and
// |path| must point to a registered preference of type |type|.
// Ownership of the returned value remains at the user pref store.
Value* GetMutableUserPref(const char* path, Value::ValueType type);
base::Value* GetMutableUserPref(const char* path,
base::Value::ValueType type);
// The PrefValueStore provides prioritized preference values. It is created
// and owned by this PrefService. Subclasses may access it for unit testing.

@ -12,13 +12,15 @@
#include "base/basictypes.h"
namespace base {
class Value;
}
// A generic string to value map used by the PrefStore implementations.
class PrefValueMap {
public:
typedef std::map<std::string, Value*>::iterator iterator;
typedef std::map<std::string, Value*>::const_iterator const_iterator;
typedef std::map<std::string, base::Value*>::iterator iterator;
typedef std::map<std::string, base::Value*>::const_iterator const_iterator;
PrefValueMap();
virtual ~PrefValueMap();
@ -26,12 +28,12 @@ class PrefValueMap {
// Gets the value for |key| and stores it in |value|. Ownership remains with
// the map. Returns true if a value is present. If not, |value| is not
// touched.
bool GetValue(const std::string& key, const Value** value) const;
bool GetValue(const std::string& key, Value** value);
bool GetValue(const std::string& key, const base::Value** value) const;
bool GetValue(const std::string& key, base::Value** value);
// Sets a new |value| for |key|. Takes ownership of |value|, which must be
// non-NULL. Returns true if the value changed.
bool SetValue(const std::string& key, Value* value);
bool SetValue(const std::string& key, base::Value* value);
// Removes the value for |key| from the map. Returns true if a value was
// removed.
@ -63,7 +65,7 @@ class PrefValueMap {
std::vector<std::string>* differing_keys) const;
private:
typedef std::map<std::string, Value*> Map;
typedef std::map<std::string, base::Value*> Map;
Map prefs_;

@ -12,7 +12,9 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/proxy_prefs.h"
namespace base {
class DictionaryValue;
}
// Factory and wrapper for proxy config dictionaries that are stored
// in the user preferences. The dictionary has the following structure:
@ -26,7 +28,7 @@ class DictionaryValue;
class ProxyConfigDictionary {
public:
// Creates a deep copy of |dict| and leaves ownership to caller.
explicit ProxyConfigDictionary(const DictionaryValue* dict);
explicit ProxyConfigDictionary(const base::DictionaryValue* dict);
~ProxyConfigDictionary();
bool GetMode(ProxyPrefs::ProxyMode* out) const;
@ -36,22 +38,23 @@ class ProxyConfigDictionary {
bool GetBypassList(std::string* out) const;
bool HasBypassList() const;
static DictionaryValue* CreateDirect();
static DictionaryValue* CreateAutoDetect();
static DictionaryValue* CreatePacScript(const std::string& pac_url,
static base::DictionaryValue* CreateDirect();
static base::DictionaryValue* CreateAutoDetect();
static base::DictionaryValue* CreatePacScript(const std::string& pac_url,
bool pac_mandatory);
static DictionaryValue* CreateFixedServers(
static base::DictionaryValue* CreateFixedServers(
const std::string& proxy_server,
const std::string& bypass_list);
static DictionaryValue* CreateSystem();
static base::DictionaryValue* CreateSystem();
private:
static DictionaryValue* CreateDictionary(ProxyPrefs::ProxyMode mode,
const std::string& pac_url,
bool pac_mandatory,
const std::string& proxy_server,
const std::string& bypass_list);
static base::DictionaryValue* CreateDictionary(
ProxyPrefs::ProxyMode mode,
const std::string& pac_url,
bool pac_mandatory,
const std::string& proxy_server,
const std::string& bypass_list);
scoped_ptr<DictionaryValue> dict_;
scoped_ptr<base::DictionaryValue> dict_;
DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary);
};

@ -17,9 +17,12 @@
#include "base/values.h"
#include "chrome/browser/prefs/pref_service.h"
class PrefService;
namespace base {
class DictionaryValue;
class ListValue;
class PrefService;
}
namespace subtle {
@ -37,7 +40,7 @@ class ScopedUserPrefUpdateBase : public base::NonThreadSafe {
virtual ~ScopedUserPrefUpdateBase();
// Sets |value_| to |service_|->GetMutableUserPref and returns it.
Value* Get(Value::ValueType type);
base::Value* Get(Value::ValueType type);
private:
// If |value_| is not null, triggers a notification of PrefObservers and
@ -49,7 +52,7 @@ class ScopedUserPrefUpdateBase : public base::NonThreadSafe {
// Path of the preference being updated.
std::string path_;
// Cache of value from user pref store (set between Get() and Notify() calls).
Value* value_;
base::Value* value_;
DISALLOW_COPY_AND_ASSIGN(ScopedUserPrefUpdateBase);
};
@ -96,8 +99,8 @@ class ScopedUserPrefUpdate : public subtle::ScopedUserPrefUpdateBase {
DISALLOW_COPY_AND_ASSIGN(ScopedUserPrefUpdate);
};
typedef ScopedUserPrefUpdate<DictionaryValue, Value::TYPE_DICTIONARY>
typedef ScopedUserPrefUpdate<base::DictionaryValue, Value::TYPE_DICTIONARY>
DictionaryPrefUpdate;
typedef ScopedUserPrefUpdate<ListValue, Value::TYPE_LIST> ListPrefUpdate;
typedef ScopedUserPrefUpdate<base::ListValue, Value::TYPE_LIST> ListPrefUpdate;
#endif // CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_

@ -12,8 +12,6 @@
#include "chrome/browser/prefs/pref_value_map.h"
#include "chrome/common/persistent_pref_store.h"
class DictionaryValue;
// |TestingPrefStore| is a preference store implementation that allows tests to
// explicitly manipulate the contents of the store, triggering notifications
// where appropriate.
@ -24,16 +22,17 @@ class TestingPrefStore : public PersistentPrefStore {
// Overriden from PrefStore.
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 ReadResult GetMutableValue(const std::string& key,
base::Value** result);
virtual void ReportValueChanged(const std::string& key);
virtual void SetValue(const std::string& key, Value* value);
virtual void SetValueSilently(const std::string& key, Value* value);
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 PersistentPrefStore::PrefReadError ReadPrefs();

@ -15,15 +15,15 @@
// storing the preference values.
class ValueMapPrefStore : public PrefStore {
public:
typedef std::map<std::string, Value*>::iterator iterator;
typedef std::map<std::string, Value*>::const_iterator const_iterator;
typedef std::map<std::string, base::Value*>::iterator iterator;
typedef std::map<std::string, base::Value*>::const_iterator const_iterator;
ValueMapPrefStore();
virtual ~ValueMapPrefStore();
// PrefStore overrides:
virtual ReadResult GetValue(const std::string& key,
const Value** value) const;
const base::Value** value) const;
virtual void AddObserver(PrefStore::Observer* observer);
virtual void RemoveObserver(PrefStore::Observer* observer);
@ -35,7 +35,7 @@ class ValueMapPrefStore : public PrefStore {
protected:
// Store a |value| for |key| in the store. Also generates an notification if
// the value changed. Assumes ownership of |value|, which must be non-NULL.
void SetValue(const std::string& key, Value* value);
void SetValue(const std::string& key, base::Value* value);
// Remove the value for |key| from the store. Sends a notification if there
// was a value to be removed.

@ -164,7 +164,7 @@ class PrerenderContents : public NotificationObserver,
int32 starting_page_id() { return starting_page_id_; }
Value* GetAsValue() const;
base::Value* GetAsValue() const;
protected:
PrerenderContents(PrerenderManager* prerender_manager,

@ -14,7 +14,9 @@
#include "chrome/browser/prerender/prerender_origin.h"
#include "googleurl/src/gurl.h"
namespace base {
class Value;
}
namespace prerender {
@ -64,7 +66,7 @@ class PrerenderHistory : public base::NonThreadSafe {
void Clear();
// Retrieves the entries as a value which can be displayed.
Value* GetEntriesAsValue() const;
base::Value* GetEntriesAsValue() const;
private:
std::list<Entry> entries_;

@ -169,7 +169,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// Returns a Value object containing the active pages being prerendered, and
// a history of pages which were prerendered. The caller is responsible for
// deleting the return value.
Value* GetAsValue() const;
base::Value* GetAsValue() const;
// Clears the data indicated by which bits of clear_flags are set.
//
@ -308,7 +308,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// Returns a new Value representing the pages currently being prerendered. The
// caller is responsible for delete'ing the return value.
Value* GetActivePrerendersAsValue() const;
base::Value* GetActivePrerendersAsValue() const;
// Destroys all pending prerenders using FinalStatus. Also deletes them as
// well as any swapped out TabContents queued for destruction.

@ -25,6 +25,10 @@ class ServiceProcessControl;
class GoogleServiceAuthError;
class Browser;
namespace base {
class DictionaryValue;
}
// This class is responsible for showing a cloud print setup dialog
// and perform operations to fill the content of the dialog and handle
// user actions in the dialog.
@ -109,7 +113,7 @@ class CloudPrintSetupFlow : public HtmlDialogUIDelegate,
void OnUserClickedPrintTestPage();
// The following methods control which iframe is visible.
void ShowGaiaLogin(const DictionaryValue& args);
void ShowGaiaLogin(const base::DictionaryValue& args);
void ShowGaiaSuccessAndSettingUp();
void ShowGaiaFailed(const GoogleServiceAuthError& error);
void ShowSetupDone();

@ -18,9 +18,14 @@
#include "content/common/notification_registrar.h"
class GURL;
class StringValue;
class CloudPrintHtmlDialogDelegateTest;
namespace base {
class ListValue;
class StringValue;
class Value;
}
namespace internal_cloud_print_helpers {
// Small class to virtualize a few functions to aid with unit testing.
@ -33,10 +38,10 @@ class CloudPrintDataSenderHelper {
// facilitate unit testing.
virtual void CallJavascriptFunction(const std::wstring& function_name);
virtual void CallJavascriptFunction(const std::wstring& function_name,
const Value& arg);
const base::Value& arg);
virtual void CallJavascriptFunction(const std::wstring& function_name,
const Value& arg1,
const Value& arg2);
const base::Value& arg1,
const base::Value& arg2);
private:
WebUI* web_ui_;
@ -73,7 +78,7 @@ class CloudPrintDataSender
base::Lock lock_;
CloudPrintDataSenderHelper* volatile helper_;
scoped_ptr<StringValue> print_data_;
scoped_ptr<base::StringValue> print_data_;
string16 print_job_title_;
std::string file_type_;
@ -106,9 +111,9 @@ class CloudPrintFlowHandler : public WebUIMessageHandler,
const NotificationDetails& details);
// Callbacks from the page.
void HandleShowDebugger(const ListValue* args);
void HandleSendPrintData(const ListValue* args);
void HandleSetPageParameters(const ListValue* args);
void HandleShowDebugger(const base::ListValue* args);
void HandleSendPrintData(const base::ListValue* args);
void HandleSetPageParameters(const base::ListValue* args);
virtual void SetDialogDelegate(CloudPrintHtmlDialogDelegate *delegate);
void StoreDialogClientSize() const;

@ -39,7 +39,7 @@ class PrintDialogGtk
// printing::PrintDialogGtkInterface implementation.
virtual void UseDefaultSettings();
virtual bool UpdateSettings(const DictionaryValue& settings,
virtual bool UpdateSettings(const base::DictionaryValue& settings,
const printing::PageRanges& ranges);
virtual void ShowDialog(
PrintingContextCairo::PrintSettingsCallback* callback);

@ -14,7 +14,9 @@
#include "printing/printing_context.h"
#include "ui/gfx/native_widget_types.h"
namespace base {
class DictionaryValue;
}
namespace printing {
@ -46,7 +48,7 @@ class PrintJobWorker : public base::Thread {
// Set the new print settings. This function takes ownership of
// |new_settings|.
void SetSettings(const DictionaryValue* const new_settings);
void SetSettings(const base::DictionaryValue* const new_settings);
// Starts the printing loop. Every pages are printed as soon as the data is
// available. Makes sure the new_document is the right one.
@ -100,7 +102,7 @@ class PrintJobWorker : public base::Thread {
// Called on the UI thread to update the print settings. This function takes
// the ownership of |new_settings|.
void UpdatePrintSettings(const DictionaryValue* const new_settings);
void UpdatePrintSettings(const base::DictionaryValue* const new_settings);
// Reports settings back to owner_.
void GetSettingsDone(PrintingContext::Result result);

@ -11,10 +11,10 @@
#include "ui/gfx/native_widget_types.h"
class CancelableTask;
class DictionaryValue;
class MessageLoop;
namespace base {
class DictionaryValue;
class Thread;
}
@ -53,7 +53,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
CancelableTask* callback);
// Updates the current settings with |new_settings| dictionary values.
void SetSettings(const DictionaryValue& new_settings,
void SetSettings(const base::DictionaryValue& new_settings,
CancelableTask* callback);
// Stops the worker thread since the client is done with this object.

Some files were not shown because too many files have changed in this diff Show More