diff options
Diffstat (limited to 'chrome')
119 files changed, 422 insertions, 309 deletions
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index be19f7b..c5f62a8 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -537,8 +537,9 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { } #if defined(OS_MACOSX) -void ChromeMainDelegate::InitMacCrashReporter(const CommandLine& command_line, - const std::string& process_type) { +void ChromeMainDelegate::InitMacCrashReporter( + const base::CommandLine& command_line, + const std::string& process_type) { // TODO(mark): Right now, InitCrashReporter() needs to be called after // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, // Breakpad initialization could occur sooner, preferably even before the diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h index f4a105b..5b651fe 100644 --- a/chrome/app/chrome_main_delegate.h +++ b/chrome/app/chrome_main_delegate.h @@ -10,6 +10,10 @@ #include "chrome/common/chrome_content_client.h" #include "content/public/app/content_main_delegate.h" +namespace base { +class CommandLine; +} + // Chrome implementation of ContentMainDelegate. class ChromeMainDelegate : public content::ContentMainDelegate { public: @@ -42,7 +46,7 @@ class ChromeMainDelegate : public content::ContentMainDelegate { virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; #if defined(OS_MACOSX) - void InitMacCrashReporter(const CommandLine& command_line, + void InitMacCrashReporter(const base::CommandLine& command_line, const std::string& process_type); #endif // defined(OS_MACOSX) diff --git a/chrome/browser/about_flags.h b/chrome/browser/about_flags.h index 8856c9e..55859db 100644 --- a/chrome/browser/about_flags.h +++ b/chrome/browser/about_flags.h @@ -112,13 +112,14 @@ enum SentinelsMode { kNoSentinels, kAddSentinels }; // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the // commandline flags belonging to the active experiments to |command_line|. void ConvertFlagsToSwitches(FlagsStorage* flags_storage, - CommandLine* command_line, + base::CommandLine* command_line, SentinelsMode sentinels); // Compares a set of switches of the two provided command line objects and // returns true if they are the same and false otherwise. bool AreSwitchesIdenticalToCurrentCommandLine( - const CommandLine& new_cmdline, const CommandLine& active_cmdline); + const base::CommandLine& new_cmdline, + const base::CommandLine& active_cmdline); // Differentiate between generic flags available on a per session base and flags // that influence the whole machine and can be said by the admin only. This flag @@ -145,7 +146,7 @@ void SetExperimentEnabled(FlagsStorage* flags_storage, // Removes all switches that were added to a command line by a previous call to // |ConvertFlagsToSwitches()|. void RemoveFlagsSwitches( - std::map<std::string, CommandLine::StringType>* switch_list); + std::map<std::string, base::CommandLine::StringType>* switch_list); // Reset all flags to the default state by clearing all flags. void ResetAllFlags(FlagsStorage* flags_storage); diff --git a/chrome/browser/apps/app_browsertest_util.h b/chrome/browser/apps/app_browsertest_util.h index 6c1c3c8..6dc8da8 100644 --- a/chrome/browser/apps/app_browsertest_util.h +++ b/chrome/browser/apps/app_browsertest_util.h @@ -9,12 +9,15 @@ #include "chrome/browser/extensions/extension_apitest.h" #include "content/public/common/page_transition_types.h" +namespace base { +class CommandLine; +} + namespace content { class WebContents; } class Browser; -class CommandLine; namespace extensions { class Extension; @@ -23,7 +26,7 @@ class PlatformAppBrowserTest : public ExtensionApiTest { public: PlatformAppBrowserTest(); - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; // Gets the first app window that is found for a given browser. static apps::AppWindow* GetFirstAppWindowForBrowser(Browser* browser); @@ -107,7 +110,7 @@ class PlatformAppBrowserTest : public ExtensionApiTest { class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; } // namespace extensions diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h index 87f5d97..05f0953 100644 --- a/chrome/browser/background/background_contents_service.h +++ b/chrome/browser/background/background_contents_service.h @@ -19,11 +19,11 @@ #include "ui/base/window_open_disposition.h" #include "url/gurl.h" -class CommandLine; class PrefService; class Profile; namespace base { +class CommandLine; class DictionaryValue; } @@ -53,7 +53,8 @@ class BackgroundContentsService : private content::NotificationObserver, public BackgroundContents::Delegate, public KeyedService { public: - BackgroundContentsService(Profile* profile, const CommandLine* command_line); + BackgroundContentsService(Profile* profile, + const base::CommandLine* command_line); virtual ~BackgroundContentsService(); // Allows tests to reduce the time between a force-installed app/extension diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h index ae9bd48..4d87aca1 100644 --- a/chrome/browser/background/background_mode_manager.h +++ b/chrome/browser/background/background_mode_manager.h @@ -20,13 +20,16 @@ #include "content/public/browser/notification_registrar.h" class Browser; -class CommandLine; class PrefRegistrySimple; class Profile; class ProfileInfoCache; class StatusIcon; class StatusTray; +namespace base { +class CommandLine; +} + namespace extensions { class Extension; } @@ -54,7 +57,7 @@ class BackgroundModeManager public ProfileInfoCacheObserver, public StatusIconMenuModel::Delegate { public: - BackgroundModeManager(CommandLine* command_line, + BackgroundModeManager(base::CommandLine* command_line, ProfileInfoCache* profile_cache); virtual ~BackgroundModeManager(); diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 9120e7c..f6d7dc6 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -23,7 +23,6 @@ class ChromeNetLog; class ChromeResourceDispatcherHostDelegate; -class CommandLine; class RemoteDebuggingServer; class PrefRegistrySimple; class PromoResourceService; @@ -33,6 +32,7 @@ class PluginsResourceService; #endif namespace base { +class CommandLine; class SequencedTaskRunner; } @@ -51,7 +51,7 @@ class BrowserProcessImpl : public BrowserProcess, public: // |local_state_task_runner| must be a shutdown-blocking task runner. BrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner, - const CommandLine& command_line); + const base::CommandLine& command_line); virtual ~BrowserProcessImpl(); // Called before the browser threads are created. diff --git a/chrome/browser/browser_process_platform_part_aurawin.h b/chrome/browser/browser_process_platform_part_aurawin.h index 4d202dd..dcf85cf 100644 --- a/chrome/browser/browser_process_platform_part_aurawin.h +++ b/chrome/browser/browser_process_platform_part_aurawin.h @@ -24,7 +24,7 @@ class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, // Overridden from BrowserProcessPlatformPartBase: virtual void PlatformSpecificCommandLineProcessing( - const CommandLine& command_line) OVERRIDE; + const base::CommandLine& command_line) OVERRIDE; // content::NotificationObserver method: virtual void Observe(int type, diff --git a/chrome/browser/browser_process_platform_part_base.cc b/chrome/browser/browser_process_platform_part_base.cc index da263bf..ea65af3 100644 --- a/chrome/browser/browser_process_platform_part_base.cc +++ b/chrome/browser/browser_process_platform_part_base.cc @@ -20,7 +20,7 @@ BrowserProcessPlatformPartBase::~BrowserProcessPlatformPartBase() { } void BrowserProcessPlatformPartBase::PlatformSpecificCommandLineProcessing( - const CommandLine& /* command_line */) { + const base::CommandLine& /* command_line */) { } void BrowserProcessPlatformPartBase::StartTearDown() { diff --git a/chrome/browser/browser_process_platform_part_base.h b/chrome/browser/browser_process_platform_part_base.h index 28150e5..6ae847f 100644 --- a/chrome/browser/browser_process_platform_part_base.h +++ b/chrome/browser/browser_process_platform_part_base.h @@ -8,7 +8,9 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +namespace base { class CommandLine; +} namespace policy { class BrowserPolicyConnector; @@ -24,7 +26,7 @@ class BrowserProcessPlatformPartBase { // Called after creating the process singleton or when another chrome // rendez-vous with this one. virtual void PlatformSpecificCommandLineProcessing( - const CommandLine& command_line); + const base::CommandLine& command_line); // Called from BrowserProcessImpl::StartTearDown(). virtual void StartTearDown(); diff --git a/chrome/browser/chrome_browser_field_trials.h b/chrome/browser/chrome_browser_field_trials.h index bab7aba..515b514 100644 --- a/chrome/browser/chrome_browser_field_trials.h +++ b/chrome/browser/chrome_browser_field_trials.h @@ -12,7 +12,7 @@ class PrefService; class ChromeBrowserFieldTrials { public: - explicit ChromeBrowserFieldTrials(const CommandLine& command_line); + explicit ChromeBrowserFieldTrials(const base::CommandLine& command_line); ~ChromeBrowserFieldTrials(); // Called by the browser main sequence to set up Field Trials for this client. @@ -24,7 +24,7 @@ class ChromeBrowserFieldTrials { // reported as used. void InstantiateDynamicTrials(); - const CommandLine& parsed_command_line_; + const base::CommandLine& parsed_command_line_; DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); }; diff --git a/chrome/browser/chrome_browser_field_trials_desktop.h b/chrome/browser/chrome_browser_field_trials_desktop.h index 2668e7e..141e01f 100644 --- a/chrome/browser/chrome_browser_field_trials_desktop.h +++ b/chrome/browser/chrome_browser_field_trials_desktop.h @@ -8,9 +8,12 @@ #include "base/basictypes.h" #include "base/time/time.h" -class CommandLine; class PrefService; +namespace base { +class CommandLine; +} + namespace chrome { // Sets up common desktop-only field trials. @@ -18,7 +21,7 @@ namespace chrome { // SetupFieldTrials in chrome_browser_field_trials.cc if it is for all // platforms. // |local_state| is needed by some other methods called from within this one. -void SetupDesktopFieldTrials(const CommandLine& parsed_command_line, +void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line, const base::Time& install_time, PrefService* local_state); diff --git a/chrome/browser/chrome_browser_field_trials_mobile.h b/chrome/browser/chrome_browser_field_trials_mobile.h index dac9603..dc5f278 100644 --- a/chrome/browser/chrome_browser_field_trials_mobile.h +++ b/chrome/browser/chrome_browser_field_trials_mobile.h @@ -8,16 +8,19 @@ #include "base/basictypes.h" #include "base/time/time.h" -class CommandLine; class PrefService; +namespace base { +class CommandLine; +} + namespace chrome { // Sets up mobile-only field trials. // Add an invocation of your field trial init function to this method, or to // SetupFieldTrials in chrome_browser_field_trials.cc if it is for all // platforms. -void SetupMobileFieldTrials(const CommandLine& parsed_command_line, +void SetupMobileFieldTrials(const base::CommandLine& parsed_command_line, const base::Time& install_time, PrefService* local_state); diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h index 8ea91ed..be706ab 100644 --- a/chrome/browser/chrome_browser_main.h +++ b/chrome/browser/chrome_browser_main.h @@ -87,7 +87,7 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { const content::MainFunctionParams& parameters() const { return parameters_; } - const CommandLine& parsed_command_line() const { + const base::CommandLine& parsed_command_line() const { return parsed_command_line_; } @@ -126,7 +126,7 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { // Members initialized on construction --------------------------------------- const content::MainFunctionParams parameters_; - const CommandLine& parsed_command_line_; + const base::CommandLine& parsed_command_line_; int result_code_; // Create StartupTimeBomb object for watching jank during startup. diff --git a/chrome/browser/chrome_browser_main_win.h b/chrome/browser/chrome_browser_main_win.h index 170f92b..8ee1ec1 100644 --- a/chrome/browser/chrome_browser_main_win.h +++ b/chrome/browser/chrome_browser_main_win.h @@ -9,7 +9,9 @@ #include "chrome/browser/chrome_browser_main.h" +namespace base { class CommandLine; +} // Handle uninstallation when given the appropriate the command-line switch. // If |chrome_still_running| is true a modal dialog will be shown asking the @@ -37,18 +39,18 @@ class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts { // environment block so they are accessible in the early stages of the // chrome executable's lifetime. static void PrepareRestartOnCrashEnviroment( - const CommandLine& parsed_command_line); + const base::CommandLine& parsed_command_line); // Registers Chrome with the Windows Restart Manager, which will restore the // Chrome session when the computer is restarted after a system update. static void RegisterApplicationRestart( - const CommandLine& parsed_command_line); + const base::CommandLine& parsed_command_line); // This method handles the --hide-icons and --show-icons command line options // for chrome that get triggered by Windows from registry entries // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons // functionality so we just ask the users if they want to uninstall Chrome. - static int HandleIconsCommands(const CommandLine& parsed_command_line); + static int HandleIconsCommands(const base::CommandLine& parsed_command_line); // Check if there is any machine level Chrome installed on the current // machine. If yes and the current Chrome process is user level, we do not diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 834824c..9b5bf29 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -19,6 +19,10 @@ #include "base/memory/scoped_ptr.h" #endif +namespace base { +class CommandLine; +} + namespace content { class QuotaPermissionContext; } @@ -117,7 +121,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { virtual bool ShouldAssignSiteForURL(const GURL& url) OVERRIDE; virtual std::string GetCanonicalEncodingNameByAliasName( const std::string& alias_name) OVERRIDE; - virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, + virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) OVERRIDE; virtual std::string GetApplicationLocale() OVERRIDE; virtual std::string GetAcceptLangs( @@ -261,7 +265,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if defined(OS_POSIX) && !defined(OS_MACOSX) virtual void GetAdditionalMappedFilesForChildProcess( - const CommandLine& command_line, + const base::CommandLine& command_line, int child_process_id, std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; #endif @@ -281,8 +285,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if defined(ENABLE_WEBRTC) // Copies disable WebRTC encryption switch depending on the channel. static void MaybeCopyDisableWebRtcEncryptionSwitch( - CommandLine* to_command_line, - const CommandLine& from_command_line, + base::CommandLine* to_command_line, + const base::CommandLine& from_command_line, VersionInfo::Channel channel); #endif diff --git a/chrome/browser/chromeos/login/chrome_restart_request.h b/chrome/browser/chromeos/login/chrome_restart_request.h index 7e0311c..b9c9ba1 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.h +++ b/chrome/browser/chromeos/login/chrome_restart_request.h @@ -7,17 +7,20 @@ #include <string> -class CommandLine; class GURL; +namespace base { +class CommandLine; +} + namespace chromeos { // Returns the command line string to be used for the OTR process. Also modifies // the given command line. std::string GetOffTheRecordCommandLine( const GURL& start_url, - const CommandLine& base_command_line, - CommandLine* command_line); + const base::CommandLine& base_command_line, + base::CommandLine* command_line); // Request session manager to restart chrome with a new command line. void RestartChrome(const std::string& command_line); diff --git a/chrome/browser/chromeos/login/login_manager_test.h b/chrome/browser/chromeos/login/login_manager_test.h index 8504acb..b05db48 100644 --- a/chrome/browser/chromeos/login/login_manager_test.h +++ b/chrome/browser/chromeos/login/login_manager_test.h @@ -27,7 +27,7 @@ class LoginManagerTest : public InProcessBrowserTest { // Overriden from InProcessBrowserTest. virtual void CleanUpOnMainThread() OVERRIDE; - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; virtual void SetUpOnMainThread() OVERRIDE; diff --git a/chrome/browser/chromeos/login/login_utils.h b/chrome/browser/chromeos/login/login_utils.h index 7f70196..0b57f90 100644 --- a/chrome/browser/chromeos/login/login_utils.h +++ b/chrome/browser/chromeos/login/login_utils.h @@ -9,12 +9,15 @@ #include "base/memory/ref_counted.h" -class CommandLine; class GURL; class PrefRegistrySimple; class PrefService; class Profile; +namespace base { +class CommandLine; +} + namespace chromeos { class Authenticator; diff --git a/chrome/browser/chromeos/login/oobe_base_test.h b/chrome/browser/chromeos/login/oobe_base_test.h index ae36c3b..f5caf7d 100644 --- a/chrome/browser/chromeos/login/oobe_base_test.h +++ b/chrome/browser/chromeos/login/oobe_base_test.h @@ -39,7 +39,7 @@ class OobeBaseTest : public ExtensionApiTest { virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; virtual void SetUpOnMainThread() OVERRIDE; virtual void CleanUpOnMainThread() OVERRIDE; - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; // Network status control functions. void SimulateNetworkOffline(); diff --git a/chrome/browser/chromeos/login/wallpaper_manager.h b/chrome/browser/chromeos/login/wallpaper_manager.h index 56b5433..936a54c 100644 --- a/chrome/browser/chromeos/login/wallpaper_manager.h +++ b/chrome/browser/chromeos/login/wallpaper_manager.h @@ -26,10 +26,10 @@ #include "third_party/icu/source/i18n/unicode/timezone.h" #include "ui/gfx/image/image_skia.h" -class CommandLine; class PrefRegistrySimple; namespace base { +class CommandLine; class SequencedTaskRunner; } @@ -171,7 +171,7 @@ class WallpaperManager: public content::NotificationObserver { WallpaperManager(); virtual ~WallpaperManager(); - void set_command_line_for_testing(CommandLine* command_line) { + void set_command_line_for_testing(base::CommandLine* command_line) { command_line_for_testing_ = command_line; } @@ -354,7 +354,7 @@ class WallpaperManager: public content::NotificationObserver { void EnsureCustomWallpaperDirectories(const std::string& user_id_hash); // Gets the CommandLine representing the current process's command line. - CommandLine* GetComandLine(); + base::CommandLine* GetComandLine(); // Initialize wallpaper of registered device after device policy is trusted. // Note that before device is enrolled, it proceeds with untrusted setting. @@ -481,7 +481,7 @@ class WallpaperManager: public content::NotificationObserver { WallpaperInfo current_user_wallpaper_info_; // If non-NULL, used in place of the real command line. - CommandLine* command_line_for_testing_; + base::CommandLine* command_line_for_testing_; // Caches wallpapers of users. Accessed only on UI thread. CustomWallpaperMap wallpaper_cache_; diff --git a/chrome/browser/chromeos/login/wizard_in_process_browser_test.h b/chrome/browser/chromeos/login/wizard_in_process_browser_test.h index 019edf8..84c2759 100644 --- a/chrome/browser/chromeos/login/wizard_in_process_browser_test.h +++ b/chrome/browser/chromeos/login/wizard_in_process_browser_test.h @@ -36,7 +36,7 @@ class WizardInProcessBrowserTest : public InProcessBrowserTest { // Overriden from InProcessBrowserTest: virtual void SetUpOnMainThread() OVERRIDE; - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void CleanUpOnMainThread() OVERRIDE; private: diff --git a/chrome/browser/component_updater/component_updater_configurator.h b/chrome/browser/component_updater/component_updater_configurator.h index 8e59d1f..da8a046 100644 --- a/chrome/browser/component_updater/component_updater_configurator.h +++ b/chrome/browser/component_updater/component_updater_configurator.h @@ -7,7 +7,9 @@ #include "chrome/browser/component_updater/component_updater_service.h" +namespace base { class CommandLine; +} namespace net { class URLRequestContextGetter; @@ -16,7 +18,8 @@ class URLRequestContextGetter; namespace component_updater { ComponentUpdateService::Configurator* MakeChromeComponentUpdaterConfigurator( - const CommandLine* cmdline, net::URLRequestContextGetter* context_getter); + const base::CommandLine* cmdline, + net::URLRequestContextGetter* context_getter); } // namespace component_updater diff --git a/chrome/browser/component_updater/pnacl/pnacl_component_installer.h b/chrome/browser/component_updater/pnacl/pnacl_component_installer.h index 822b0b5..ba5fd24 100644 --- a/chrome/browser/component_updater/pnacl/pnacl_component_installer.h +++ b/chrome/browser/component_updater/pnacl/pnacl_component_installer.h @@ -15,9 +15,8 @@ #include "chrome/browser/component_updater/component_updater_service.h" #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h" -class CommandLine; - namespace base { +class CommandLine; class DictionaryValue; } @@ -52,7 +51,7 @@ class PnaclComponentInstaller : public ComponentInstaller { // Register a PNaCl component for the first time. void RegisterPnaclComponent(ComponentUpdateService* cus, - const CommandLine& command_line); + const base::CommandLine& command_line); // Check the PNaCl version again and re-register with the component // updater service. diff --git a/chrome/browser/diagnostics/diagnostics_controller.h b/chrome/browser/diagnostics/diagnostics_controller.h index f5d3d22..7e7ee17 100644 --- a/chrome/browser/diagnostics/diagnostics_controller.h +++ b/chrome/browser/diagnostics/diagnostics_controller.h @@ -8,7 +8,9 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" +namespace base { class CommandLine; +} namespace diagnostics { @@ -21,11 +23,12 @@ class DiagnosticsController { // Entry point for the diagnostics mode. Returns zero if able to run // diagnostics successfully, regardless of the results of the diagnostics. - int Run(const CommandLine& command_line, DiagnosticsWriter* writer); + int Run(const base::CommandLine& command_line, DiagnosticsWriter* writer); // Entry point for running recovery based on diagnostics that have already // been run. In order for this to do anything, Run() must be executed first. - int RunRecovery(const CommandLine& command_line, DiagnosticsWriter* writer); + int RunRecovery(const base::CommandLine& command_line, + DiagnosticsWriter* writer); // Returns a model with the results that have accumulated. They can then be // queried for their attributes for human consumption later. diff --git a/chrome/browser/diagnostics/diagnostics_model.h b/chrome/browser/diagnostics/diagnostics_model.h index 1727aaa..334c284 100644 --- a/chrome/browser/diagnostics/diagnostics_model.h +++ b/chrome/browser/diagnostics/diagnostics_model.h @@ -8,7 +8,9 @@ #include <string> #include "base/time/time.h" +namespace base { class CommandLine; +} namespace diagnostics { @@ -100,7 +102,7 @@ class DiagnosticsModel { // The factory for the model. The main purpose is to hide the creation of // different models for different platforms. -DiagnosticsModel* MakeDiagnosticsModel(const CommandLine& cmdline); +DiagnosticsModel* MakeDiagnosticsModel(const base::CommandLine& cmdline); } // namespace diagnostics diff --git a/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc b/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc index f8fe90d..ec14fd3 100644 --- a/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc +++ b/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc @@ -12,7 +12,7 @@ const char kTestCommandLineSwitch[] = "command-line-private-api-test-foo"; } // namespace class CommandLinePrivateApiTest : public ExtensionApiTest { - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(kTestCommandLineSwitch); } diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher.h b/chrome/browser/extensions/api/messaging/native_process_launcher.h index 601823d..6694bdc 100644 --- a/chrome/browser/extensions/api/messaging/native_process_launcher.h +++ b/chrome/browser/extensions/api/messaging/native_process_launcher.h @@ -11,10 +11,10 @@ #include "base/process/process.h" #include "ui/gfx/native_widget_types.h" -class CommandLine; class GURL; namespace base { +class CommandLine; class FilePath; } @@ -67,7 +67,7 @@ class NativeProcessLauncher { std::string* error_message); // Launches native messaging process. - static bool LaunchNativeProcess(const CommandLine& command_line, + static bool LaunchNativeProcess(const base::CommandLine& command_line, base::ProcessHandle* process_handle, base::PlatformFile* read_file, base::PlatformFile* write_file); diff --git a/chrome/browser/extensions/chrome_extensions_browser_client.h b/chrome/browser/extensions/chrome_extensions_browser_client.h index c81edf4..b720897 100644 --- a/chrome/browser/extensions/chrome_extensions_browser_client.h +++ b/chrome/browser/extensions/chrome_extensions_browser_client.h @@ -12,7 +12,9 @@ #include "chrome/browser/extensions/chrome_notification_observer.h" #include "extensions/browser/extensions_browser_client.h" +namespace base { class CommandLine; +} namespace content { class BrowserContext; @@ -35,7 +37,7 @@ class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { // BrowserClient overrides: virtual bool IsShuttingDown() OVERRIDE; - virtual bool AreExtensionsDisabled(const CommandLine& command_line, + virtual bool AreExtensionsDisabled(const base::CommandLine& command_line, content::BrowserContext* context) OVERRIDE; virtual bool IsValidContext(content::BrowserContext* context) OVERRIDE; virtual bool IsSameContext(content::BrowserContext* first, diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h index a6518c6..1978b87 100644 --- a/chrome/browser/extensions/extension_apitest.h +++ b/chrome/browser/extensions/extension_apitest.h @@ -188,7 +188,7 @@ class ExtensionApiTest : public ExtensionBrowserTest { const extensions::Extension* GetSingleLoadedExtension(); // All extensions tested by ExtensionApiTest are in the "api_test" dir. - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; // If it failed, what was the error message? std::string message_; diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h index 0588a21..67c32cd 100644 --- a/chrome/browser/extensions/extension_browsertest.h +++ b/chrome/browser/extensions/extension_browsertest.h @@ -75,7 +75,7 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest { // InProcessBrowserTest virtual void SetUp() OVERRIDE; - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpOnMainThread() OVERRIDE; const extensions::Extension* LoadExtension(const base::FilePath& path); diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h index 6a859c5c..5956f48 100644 --- a/chrome/browser/extensions/extension_service.h +++ b/chrome/browser/extensions/extension_service.h @@ -36,13 +36,13 @@ #include "extensions/common/manifest_handlers/shared_module_info.h" #include "extensions/common/one_shot_event.h" -class CommandLine; class ExtensionErrorUI; class ExtensionToolbarModel; class GURL; class Profile; namespace base { +class CommandLine; class SequencedTaskRunner; class Version; } @@ -152,7 +152,7 @@ class ExtensionService // Constructor stores pointers to |profile| and |extension_prefs| but // ownership remains at caller. ExtensionService(Profile* profile, - const CommandLine* command_line, + const base::CommandLine* command_line, const base::FilePath& install_directory, extensions::ExtensionPrefs* extension_prefs, extensions::Blacklist* blacklist, diff --git a/chrome/browser/extensions/startup_helper.h b/chrome/browser/extensions/startup_helper.h index 6844194..9efb7cb 100644 --- a/chrome/browser/extensions/startup_helper.h +++ b/chrome/browser/extensions/startup_helper.h @@ -8,9 +8,12 @@ #include "base/memory/ref_counted.h" #include "chrome/browser/extensions/pack_extension_job.h" -class CommandLine; class Profile; +namespace base { +class CommandLine; +} + namespace extensions { // Initialization helpers for various Extension startup actions. @@ -27,23 +30,23 @@ class StartupHelper : public PackExtensionJob::Client { // Handle --pack-extension flag from the |cmd_line| by packing the specified // extension. Returns false if the pack job failed. - bool PackExtension(const CommandLine& cmd_line); + bool PackExtension(const base::CommandLine& cmd_line); // Validates a crx at the path given by the --validate-extension flag - can // it be installed? Returns true if the crx is valid, or false otherwise. // If the return value is false, a description of the problem may be written // into |error|. - bool ValidateCrx(const CommandLine& cmd_line, std::string* error); + bool ValidateCrx(const base::CommandLine& cmd_line, std::string* error); // Handle --uninstall-extension flag from the |cmd_line| by uninstalling the // specified extension from |profile|. Returns false if the uninstall job // could not be started. - bool UninstallExtension(const CommandLine& cmd_line, Profile* profile); + bool UninstallExtension(const base::CommandLine& cmd_line, Profile* profile); // Handle --install-from-webstore flag from |cmd_line| by downloading // metadata from the webstore for the given id, prompting the user to // confirm, and then downloading the crx and installing it. - bool InstallFromWebstore(const CommandLine& cmd_line, Profile* profile); + bool InstallFromWebstore(const base::CommandLine& cmd_line, Profile* profile); // Handle --limited-install-from-webstore flag from |cmd_line| by downloading // metadata from the webstore for the given id, prompting the user to @@ -51,12 +54,14 @@ class StartupHelper : public PackExtensionJob::Client { // This whole process is only kicked off by this function and completed // asynchronously unlike InstallFromWebstore which finishes everything before // returning. - void LimitedInstallFromWebstore(const CommandLine& cmd_line, Profile* profile, + void LimitedInstallFromWebstore(const base::CommandLine& cmd_line, + Profile* profile, base::Callback<void()> done_callback); // Maps the command line argument to the extension id. Returns an empty string // in the case when there is no mapping. - std::string WebStoreIdFromLimitedInstallCmdLine(const CommandLine& cmd_line); + std::string WebStoreIdFromLimitedInstallCmdLine( + const base::CommandLine& cmd_line); private: scoped_refptr<PackExtensionJob> pack_job_; bool pack_job_succeeded_; diff --git a/chrome/browser/extensions/test_extension_system.h b/chrome/browser/extensions/test_extension_system.h index 6732f68..ad5375a 100644 --- a/chrome/browser/extensions/test_extension_system.h +++ b/chrome/browser/extensions/test_extension_system.h @@ -8,11 +8,11 @@ #include "extensions/browser/extension_system.h" #include "extensions/common/one_shot_event.h" -class CommandLine; class Profile; class TestingValueStore; namespace base { +class CommandLine; class FilePath; class Time; } @@ -38,13 +38,13 @@ class TestExtensionSystem : public ExtensionSystem { // Creates an ExtensionPrefs with the testing profile and returns it. // Useful for tests that need to modify prefs before creating the // ExtensionService. - ExtensionPrefs* CreateExtensionPrefs(const CommandLine* command_line, + ExtensionPrefs* CreateExtensionPrefs(const base::CommandLine* command_line, const base::FilePath& install_directory); // Creates an ExtensionService initialized with the testing profile and // returns it, and creates ExtensionPrefs if it hasn't been created yet. ExtensionService* CreateExtensionService( - const CommandLine* command_line, + const base::CommandLine* command_line, const base::FilePath& install_directory, bool autoupdate_enabled); diff --git a/chrome/browser/extensions/webstore_installer_test.h b/chrome/browser/extensions/webstore_installer_test.h index 40518ba..00a7ae8 100644 --- a/chrome/browser/extensions/webstore_installer_test.h +++ b/chrome/browser/extensions/webstore_installer_test.h @@ -23,7 +23,7 @@ class WebstoreInstallerTest : public InProcessBrowserTest { const std::string& unverified_domain); virtual ~WebstoreInstallerTest(); - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; protected: diff --git a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc index ed5ea91..77443a6 100644 --- a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc +++ b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc @@ -56,7 +56,7 @@ class WebstoreStartupInstallerTest : public WebstoreInstallerTest { }; IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, Install) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); ui_test_utils::NavigateToURL( @@ -71,7 +71,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, Install) { IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallNotAllowedFromNonVerifiedDomains) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); ui_test_utils::NavigateToURL( browser(), @@ -91,7 +91,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, FindLink) { // Flakes on all platforms: http://crbug.com/95713, http://crbug.com/229947 IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, DISABLED_ArgumentValidation) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); // Each of these tests has to run separately, since one page/tab can @@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, } IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, MultipleInstallCalls) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); ui_test_utils::NavigateToURL( @@ -118,7 +118,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, MultipleInstallCalls) { } IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallNotSupported) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); ui_test_utils::NavigateToURL( browser(), @@ -138,7 +138,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallNotSupported) { // Regression test for http://crbug.com/144991. IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallFromHostedApp) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); const GURL kInstallUrl = GenerateTestServerUrl(kAppDomain, "install.html"); @@ -175,7 +175,7 @@ class WebstoreStartupInstallerManagedUsersTest : public WebstoreStartupInstallerTest { public: // InProcessBrowserTest overrides: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE { WebstoreStartupInstallerTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kManagedUserId, "asdf"); } @@ -185,11 +185,12 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerManagedUsersTest, InstallProhibited) { #if defined(OS_WIN) && defined(USE_ASH) // Disable this test in Metro+Ash for now (http://crbug.com/262796). - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kAshBrowserTests)) return; #endif - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); ui_test_utils::NavigateToURL( @@ -208,12 +209,12 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerManagedUsersTest, class WebstoreStartupInstallUnpackFailureTest : public WebstoreStartupInstallerTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE { WebstoreStartupInstallerTest::SetUpCommandLine(command_line); GURL crx_url = GenerateTestServerUrl( kWebstoreDomain, "malformed_extension.crx"); - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryUpdateURL, crx_url.spec()); } @@ -225,7 +226,7 @@ class WebstoreStartupInstallUnpackFailureTest IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallUnpackFailureTest, WebstoreStartupInstallUnpackFailureTest) { - CommandLine::ForCurrentProcess()->AppendSwitchASCII( + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); ui_test_utils::NavigateToURL(browser(), @@ -280,7 +281,7 @@ class CommandLineWebstoreInstall : public WebstoreStartupInstallerTest, }; IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Accept) { - CommandLine* command_line = CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII( switches::kInstallFromWebstore, kTestExtensionId); command_line->AppendSwitchASCII( @@ -292,7 +293,7 @@ IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Accept) { } IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Cancel) { - CommandLine* command_line = CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII( switches::kInstallFromWebstore, kTestExtensionId); command_line->AppendSwitchASCII( @@ -308,20 +309,20 @@ IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, LimitedAccept) { // Small test of "WebStoreIdFromLimitedInstallCmdLine" which made more // sense together with the rest of the test for "LimitedInstallFromWebstore". - CommandLine command_line_test1(CommandLine::NO_PROGRAM); + base::CommandLine command_line_test1(base::CommandLine::NO_PROGRAM); command_line_test1.AppendSwitchASCII(switches::kLimitedInstallFromWebstore, "1"); EXPECT_EQ("nckgahadagoaajjgafhacjanaoiihapd", helper.WebStoreIdFromLimitedInstallCmdLine(command_line_test1)); - CommandLine command_line_test2(CommandLine::NO_PROGRAM); + base::CommandLine command_line_test2(base::CommandLine::NO_PROGRAM); command_line_test1.AppendSwitchASCII(switches::kLimitedInstallFromWebstore, "2"); EXPECT_EQ(kTestExtensionId, helper.WebStoreIdFromLimitedInstallCmdLine(command_line_test1)); // Now, on to the real test for LimitedInstallFromWebstore. - CommandLine* command_line = CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII( switches::kLimitedInstallFromWebstore, "2"); helper.LimitedInstallFromWebstore(*command_line, browser()->profile(), diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h index 6932b3a..f9683fa 100644 --- a/chrome/browser/first_run/first_run.h +++ b/chrome/browser/first_run/first_run.h @@ -10,11 +10,11 @@ #include "base/basictypes.h" -class CommandLine; class GURL; class Profile; namespace base { +class CommandLine; class FilePath; } @@ -88,7 +88,7 @@ bool IsChromeFirstRun(); // Returns true if |command_line|'s switches explicitly specify that first run // should be suppressed in the current run. -bool IsFirstRunSuppressed(const CommandLine& command_line); +bool IsFirstRunSuppressed(const base::CommandLine& command_line); // Creates the first run sentinel if needed. This should only be called after // the process singleton has been grabbed by the current process diff --git a/chrome/browser/first_run/upgrade_util.h b/chrome/browser/first_run/upgrade_util.h index ec8a1ce..700b2b4 100644 --- a/chrome/browser/first_run/upgrade_util.h +++ b/chrome/browser/first_run/upgrade_util.h @@ -13,13 +13,15 @@ #if !defined(OS_CHROMEOS) +namespace base { class CommandLine; +} namespace upgrade_util { // Launches Chrome again simulating a "user" launch. If Chrome could not be // launched, returns false. -bool RelaunchChromeBrowser(const CommandLine& command_line); +bool RelaunchChromeBrowser(const base::CommandLine& command_line); #if defined(OS_WIN) @@ -40,14 +42,14 @@ RelaunchMode RelaunchModeStringToEnum(const std::string& relaunch_mode); // Like RelaunchChromeBrowser() but for Windows 8 it will read pref and restart // chrome accordingly in desktop or metro mode. -bool RelaunchChromeWithMode(const CommandLine& command_line, +bool RelaunchChromeWithMode(const base::CommandLine& command_line, const RelaunchMode& relaunch_mode); #endif #if !defined(OS_MACOSX) -void SetNewCommandLine(CommandLine* new_command_line); +void SetNewCommandLine(base::CommandLine* new_command_line); // Launches a new instance of the browser if the current instance in persistent // mode an upgrade is detected. diff --git a/chrome/browser/first_run/upgrade_util_win.h b/chrome/browser/first_run/upgrade_util_win.h index af0f844..c5a5d5c 100644 --- a/chrome/browser/first_run/upgrade_util_win.h +++ b/chrome/browser/first_run/upgrade_util_win.h @@ -5,7 +5,9 @@ #ifndef CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_ #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_ +namespace base { class CommandLine; +} namespace upgrade_util { @@ -19,7 +21,7 @@ bool SwapNewChromeExeIfPresent(); // the browser. Note that relaunch does NOT exit the existing browser process. // If this is called before message loop is executed, simply exit the main // function. If browser is already running, you will need to exit it. -bool DoUpgradeTasks(const CommandLine& command_line); +bool DoUpgradeTasks(const base::CommandLine& command_line); } // namespace upgrade_util diff --git a/chrome/browser/invalidation/invalidation_service_util.h b/chrome/browser/invalidation/invalidation_service_util.h index 7f44c31..a18c7f5 100644 --- a/chrome/browser/invalidation/invalidation_service_util.h +++ b/chrome/browser/invalidation/invalidation_service_util.h @@ -7,12 +7,15 @@ #include "jingle/notifier/base/notifier_options.h" +namespace base { class CommandLine; +} namespace invalidation { // Parses the given command line for notifier options. -notifier::NotifierOptions ParseNotifierOptions(const CommandLine& command_line); +notifier::NotifierOptions ParseNotifierOptions( + const base::CommandLine& command_line); // Generates a unique client ID for the invalidator. std::string GenerateInvalidatorClientId(); diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index a41d83f..40bee1b 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -22,12 +22,15 @@ #include "net/socket/next_proto.h" class ChromeNetLog; -class CommandLine; class PrefProxyConfigTracker; class PrefService; class PrefRegistrySimple; class SystemURLRequestContextGetter; +namespace base { +class CommandLine; +} + namespace chrome_browser_net { class DnsProbeService; class HttpPipeliningCompatibilityClient; @@ -222,7 +225,7 @@ class IOThread : public content::BrowserThreadDelegate { virtual void InitAsync() OVERRIDE; virtual void CleanUp() OVERRIDE; - void InitializeNetworkOptions(const CommandLine& parsed_command_line); + void InitializeNetworkOptions(const base::CommandLine& parsed_command_line); // Enable SPDY with the given mode, which may contain the following: // @@ -263,41 +266,41 @@ class IOThread : public content::BrowserThreadDelegate { // Configures QUIC options based on the flags in |command_line| as // well as the QUIC field trial group. - void ConfigureQuic(const CommandLine& command_line); + void ConfigureQuic(const base::CommandLine& command_line); // Returns true if QUIC should be enabled, either as a result // of a field trial or a command line flag. - bool ShouldEnableQuic(const CommandLine& command_line, + bool ShouldEnableQuic(const base::CommandLine& command_line, base::StringPiece quic_trial_group); // Returns true if HTTPS over QUIC should be enabled, either as a result // of a field trial or a command line flag. - bool ShouldEnableQuicHttps(const CommandLine& command_line, + bool ShouldEnableQuicHttps(const base::CommandLine& command_line, base::StringPiece quic_trial_group); // Returns true if the selection of the ephemeral port in bind() should be // performed by Chromium, and false if the OS should select the port. The OS // option is used to prevent Windows from posting a security security warning // dialog. - bool ShouldEnableQuicPortSelection(const CommandLine& command_line); + bool ShouldEnableQuicPortSelection(const base::CommandLine& command_line); // Returns true if QUIC packet pacing should be negotiated during the // QUIC handshake. - bool ShouldEnableQuicPacing(const CommandLine& command_line, + bool ShouldEnableQuicPacing(const base::CommandLine& command_line, base::StringPiece quic_trial_group); // Returns true if Chromium should persist QUIC server config information to // disk cache. - bool ShouldEnableQuicPersistServerInfo(const CommandLine& command_line); + bool ShouldEnableQuicPersistServerInfo(const base::CommandLine& command_line); // Returns the maximum length for QUIC packets, based on any flags in // |command_line| or the field trial. Returns 0 if there is an error // parsing any of the options, or if the default value should be used. - size_t GetQuicMaxPacketLength(const CommandLine& command_line, + size_t GetQuicMaxPacketLength(const base::CommandLine& command_line, base::StringPiece quic_trial_group); // Returns the quic versions specified by any flags in |command_line|. - net::QuicVersion GetQuicVersion(const CommandLine& command_line); + net::QuicVersion GetQuicVersion(const base::CommandLine& command_line); // The NetLog is owned by the browser process, to allow logging from other // threads during shutdown, but is used most frequently on the IOThread. diff --git a/chrome/browser/jankometer.h b/chrome/browser/jankometer.h index fe5d4f6..d4ce5ca 100644 --- a/chrome/browser/jankometer.h +++ b/chrome/browser/jankometer.h @@ -5,7 +5,9 @@ #ifndef CHROME_BROWSER_JANKOMETER_H_ #define CHROME_BROWSER_JANKOMETER_H_ +namespace base { class CommandLine; +} // The Jank-O-Meter measures jankyness, which is user-perceivable lag in // responsiveness of the application. @@ -14,7 +16,7 @@ class CommandLine; // // This function will initialize the service, which will install itself in // critical threads. It should be called on the UI thread. -void InstallJankometer(const CommandLine& parsed_command_line); +void InstallJankometer(const base::CommandLine& parsed_command_line); // Clean up Jank-O-Meter junk void UninstallJankometer(); diff --git a/chrome/browser/jankometer_android.cc b/chrome/browser/jankometer_android.cc index 6a57f05..5979cf0 100644 --- a/chrome/browser/jankometer_android.cc +++ b/chrome/browser/jankometer_android.cc @@ -4,7 +4,7 @@ #include "chrome/browser/jankometer.h" -void InstallJankometer(const CommandLine& parsed_command_line) { +void InstallJankometer(const base::CommandLine& parsed_command_line) { } void UninstallJankometer() { diff --git a/chrome/browser/jankometer_mac.cc b/chrome/browser/jankometer_mac.cc index cf85869..882299a 100644 --- a/chrome/browser/jankometer_mac.cc +++ b/chrome/browser/jankometer_mac.cc @@ -4,7 +4,7 @@ #include "chrome/browser/jankometer.h" -void InstallJankometer(const CommandLine& parsed_command_line) { +void InstallJankometer(const base::CommandLine& parsed_command_line) { // TODO(port): Implement jankometer, http://crbug.com/8077 } diff --git a/chrome/browser/jumplist_updater_win.h b/chrome/browser/jumplist_updater_win.h index 16de382..283a270 100644 --- a/chrome/browser/jumplist_updater_win.h +++ b/chrome/browser/jumplist_updater_win.h @@ -30,7 +30,7 @@ class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> { const SkBitmap& icon_data() const { return icon_data_; } std::wstring GetArguments() const; - CommandLine* GetCommandLine(); + base::CommandLine* GetCommandLine(); void set_title(const std::wstring& title) { title_ = title; @@ -50,7 +50,7 @@ class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> { ~ShellLinkItem(); // Used for storing and appending command-line arguments. - CommandLine command_line_; + base::CommandLine command_line_; // The string to be displayed in a JumpList. std::wstring title_; diff --git a/chrome/browser/media/test_license_server_config.h b/chrome/browser/media/test_license_server_config.h index b25da78..e39c0e2 100644 --- a/chrome/browser/media/test_license_server_config.h +++ b/chrome/browser/media/test_license_server_config.h @@ -8,10 +8,10 @@ #include <string> #include "base/basictypes.h" -class CommandLine; namespace base { - class FilePath; +class CommandLine; +class FilePath; } // Class used to start a test license server. @@ -27,7 +27,7 @@ class TestLicenseServerConfig { // Returns true if it successfully sets the command line to run the license // server with needed args and switches. - virtual bool GetServerCommandLine(CommandLine* command_line) = 0; + virtual bool GetServerCommandLine(base::CommandLine* command_line) = 0; // Returns true if the server is supported on current platform. virtual bool IsPlatformSupported() = 0; diff --git a/chrome/browser/media/wv_test_license_server_config.h b/chrome/browser/media/wv_test_license_server_config.h index ecd7874..4acfd69 100644 --- a/chrome/browser/media/wv_test_license_server_config.h +++ b/chrome/browser/media/wv_test_license_server_config.h @@ -15,7 +15,7 @@ class WVTestLicenseServerConfig : public TestLicenseServerConfig { virtual std::string GetServerURL() OVERRIDE; - virtual bool GetServerCommandLine(CommandLine* command_line) OVERRIDE; + virtual bool GetServerCommandLine(base::CommandLine* command_line) OVERRIDE; virtual bool IsPlatformSupported() OVERRIDE; diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h index 94d5248..4cd2f92 100644 --- a/chrome/browser/metrics/thread_watcher.h +++ b/chrome/browser/metrics/thread_watcher.h @@ -381,7 +381,7 @@ class ThreadWatcherList { // This method posts a task on WatchDogThread to start watching all browser // threads. // This method is accessible on UI thread. - static void StartWatchingAll(const CommandLine& command_line); + static void StartWatchingAll(const base::CommandLine& command_line); // This method posts a task on WatchDogThread to RevokeAll tasks and to // deactive thread watching of other threads and tell NotificationService to @@ -425,7 +425,7 @@ class ThreadWatcherList { // switches::kCrashOnHangThreads. |crash_on_hang_threads| is a map of // |crash_on_hang| thread's names to |CrashDataThresholds|. static void ParseCommandLine( - const CommandLine& command_line, + const base::CommandLine& command_line, uint32* unresponsive_threshold, CrashOnHangThreadMap* crash_on_hang_threads); diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/proxy_service_factory.h index 3d3b0d9..b91c2e3 100644 --- a/chrome/browser/net/proxy_service_factory.h +++ b/chrome/browser/net/proxy_service_factory.h @@ -7,10 +7,13 @@ #include "base/basictypes.h" -class CommandLine; class PrefProxyConfigTracker; class PrefService; +namespace base { +class CommandLine; +} + namespace net { class NetLog; class NetworkDelegate; @@ -46,7 +49,7 @@ class ProxyServiceFactory { net::URLRequestContext* context, net::NetworkDelegate* network_delegate, net::ProxyConfigService* proxy_config_service, - const CommandLine& command_line, + const base::CommandLine& command_line, bool quick_check_enabled); private: diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h index e86be50..c55d233 100644 --- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h +++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h @@ -9,7 +9,9 @@ #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" +namespace base { class CommandLine; +} namespace notifier { @@ -26,7 +28,7 @@ class ChromeNotifierServiceFactory : public BrowserContextKeyedServiceFactory { // not. // TODO(petewil): Remove this when the SyncedNotifications feature is ready // to be turned on by default, and just use a disable switch instead then. - static bool UseSyncedNotifications(CommandLine* command_line); + static bool UseSyncedNotifications(base::CommandLine* command_line); private: friend struct DefaultSingletonTraits<ChromeNotifierServiceFactory>; diff --git a/chrome/browser/prefs/command_line_pref_store.h b/chrome/browser/prefs/command_line_pref_store.h index 066d005..eb4b94f 100644 --- a/chrome/browser/prefs/command_line_pref_store.h +++ b/chrome/browser/prefs/command_line_pref_store.h @@ -14,7 +14,7 @@ // such as proxy settings. class CommandLinePrefStore : public ValueMapPrefStore { public: - explicit CommandLinePrefStore(const CommandLine* command_line); + explicit CommandLinePrefStore(const base::CommandLine* command_line); protected: virtual ~CommandLinePrefStore(); @@ -58,7 +58,7 @@ class CommandLinePrefStore : public ValueMapPrefStore { void ApplyBackgroundModeSwitches(); // Weak reference. - const CommandLine* command_line_; + const base::CommandLine* command_line_; // Mappings of command line switches to prefs. static const BooleanSwitchToPreferenceMapEntry boolean_switch_map_[]; diff --git a/chrome/browser/prefs/incognito_mode_prefs.h b/chrome/browser/prefs/incognito_mode_prefs.h index 698250f..d7d8d29 100644 --- a/chrome/browser/prefs/incognito_mode_prefs.h +++ b/chrome/browser/prefs/incognito_mode_prefs.h @@ -7,10 +7,13 @@ #include "base/basictypes.h" -class CommandLine; class PrefService; class Profile; +namespace base { +class CommandLine; +} + namespace user_prefs { class PrefRegistrySyncable; } @@ -52,7 +55,7 @@ class IncognitoModePrefs { static bool IntToAvailability(int in_value, Availability* out_value); // Returns true if the browser should start in incognito mode. - static bool ShouldLaunchIncognito(const CommandLine& command_line, + static bool ShouldLaunchIncognito(const base::CommandLine& command_line, const PrefService* prefs); // Returns true if |profile| can open a new Browser. This checks the incognito diff --git a/chrome/browser/prefs/pref_service_syncable_factory.h b/chrome/browser/prefs/pref_service_syncable_factory.h index 715244e..b3d326c 100644 --- a/chrome/browser/prefs/pref_service_syncable_factory.h +++ b/chrome/browser/prefs/pref_service_syncable_factory.h @@ -7,9 +7,12 @@ #include "base/prefs/pref_service_factory.h" -class CommandLine; class PrefServiceSyncable; +namespace base { +class CommandLine; +} + namespace policy { class PolicyService; } @@ -33,7 +36,7 @@ class PrefServiceSyncableFactory : public base::PrefServiceFactory { #endif // Specifies to use an actual command-line backed command-line pref store. - void SetCommandLine(CommandLine* command_line); + void SetCommandLine(base::CommandLine* command_line); scoped_ptr<PrefServiceSyncable> CreateSyncable( user_prefs::PrefRegistrySyncable* registry); diff --git a/chrome/browser/prerender/prerender_field_trial.h b/chrome/browser/prerender/prerender_field_trial.h index 93760ee..9e1c764 100644 --- a/chrome/browser/prerender/prerender_field_trial.h +++ b/chrome/browser/prerender/prerender_field_trial.h @@ -7,15 +7,18 @@ #include <string> -class CommandLine; class Profile; +namespace base { +class CommandLine; +} + namespace prerender { // Parse the --prerender= command line switch, which controls prerendering. If // the switch is unset or is set to "auto" then the user is assigned to a // field trial. -void ConfigurePrerender(const CommandLine& command_line); +void ConfigurePrerender(const base::CommandLine& command_line); // Returns true if the user has opted in or has been opted in to the // prerendering from Omnibox experiment. diff --git a/chrome/browser/printing/print_dialog_cloud.h b/chrome/browser/printing/print_dialog_cloud.h index 9507903..47da7c8 100644 --- a/chrome/browser/printing/print_dialog_cloud.h +++ b/chrome/browser/printing/print_dialog_cloud.h @@ -14,10 +14,10 @@ #include "ui/gfx/native_widget_types.h" class Browser; -class CommandLine; class Profile; namespace base { +class CommandLine; class FilePath; } @@ -59,7 +59,7 @@ void CreatePrintDialogForBytes(content::BrowserContext* browser_context, // Parse switches from command_line and display the print dialog as appropriate. bool CreatePrintDialogFromCommandLine(Profile* profile, - const CommandLine& command_line); + const base::CommandLine& command_line); // Creates a tab with Google sinnin page. // Calls |callback| when complete. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h index f0e6b72..8fc9730 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -32,7 +32,9 @@ #include "base/win/message_window.h" #endif // defined(OS_WIN) +namespace base { class CommandLine; +} // ProcessSingleton ---------------------------------------------------------- // @@ -60,7 +62,7 @@ class ProcessSingleton : public base::NonThreadSafe { // handled within the current browser instance or false if the remote process // should handle it (i.e., because the current process is shutting down). typedef base::Callback<bool( - const CommandLine& command_line, + const base::CommandLine& command_line, const base::FilePath& current_directory)> NotificationCallback; ProcessSingleton(const base::FilePath& user_data_dir, @@ -101,11 +103,12 @@ class ProcessSingleton : public base::NonThreadSafe { #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // Exposed for testing. We use a timeout on Linux, and in tests we want // this timeout to be short. - NotifyResult NotifyOtherProcessWithTimeout(const CommandLine& command_line, - int timeout_seconds, - bool kill_unresponsive); + NotifyResult NotifyOtherProcessWithTimeout( + const base::CommandLine& command_line, + int timeout_seconds, + bool kill_unresponsive); NotifyResult NotifyOtherProcessWithTimeoutOrCreate( - const CommandLine& command_line, + const base::CommandLine& command_line, int timeout_seconds); void OverrideCurrentPidForTesting(base::ProcessId pid); void OverrideKillCallbackForTesting( diff --git a/chrome/browser/process_singleton_modal_dialog_lock.h b/chrome/browser/process_singleton_modal_dialog_lock.h index d287865..73b7e7c1 100644 --- a/chrome/browser/process_singleton_modal_dialog_lock.h +++ b/chrome/browser/process_singleton_modal_dialog_lock.h @@ -10,9 +10,8 @@ #include "chrome/browser/process_singleton.h" #include "ui/gfx/native_widget_types.h" -class CommandLine; - namespace base { +class CommandLine; class FilePath; } @@ -51,7 +50,7 @@ class ProcessSingletonModalDialogLock { ProcessSingleton::NotificationCallback AsNotificationCallback(); private: - bool NotificationCallbackImpl(const CommandLine& command_line, + bool NotificationCallbackImpl(const base::CommandLine& command_line, const base::FilePath& current_directory); gfx::NativeWindow active_dialog_; diff --git a/chrome/browser/process_singleton_startup_lock.h b/chrome/browser/process_singleton_startup_lock.h index 26c00bc..187dd35 100644 --- a/chrome/browser/process_singleton_startup_lock.h +++ b/chrome/browser/process_singleton_startup_lock.h @@ -41,10 +41,10 @@ class ProcessSingletonStartupLock : public base::NonThreadSafe { bool locked() { return locked_; } private: - typedef std::pair<CommandLine::StringVector, base::FilePath> + typedef std::pair<base::CommandLine::StringVector, base::FilePath> DelayedStartupMessage; - bool NotificationCallbackImpl(const CommandLine& command_line, + bool NotificationCallbackImpl(const base::CommandLine& command_line, const base::FilePath& current_directory); bool locked_; diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index cae65ea..b9e49ce 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -24,7 +24,6 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -class CommandLine; class NewProfileLauncher; class ProfileInfoCache; diff --git a/chrome/browser/profiles/profile_shortcut_manager.h b/chrome/browser/profiles/profile_shortcut_manager.h index 6638f43..68cc324 100644 --- a/chrome/browser/profiles/profile_shortcut_manager.h +++ b/chrome/browser/profiles/profile_shortcut_manager.h @@ -10,9 +10,12 @@ #include "base/strings/string16.h" #include "chrome/browser/profiles/profile_info_cache.h" -class CommandLine; class ProfileManager; +namespace base { +class CommandLine; +} + class ProfileShortcutManager { public: virtual ~ProfileShortcutManager(); @@ -40,7 +43,7 @@ class ProfileShortcutManager { // Populates the |command_line|, |name| and |icon_path| that a shortcut for // the given |profile_path| should use. virtual void GetShortcutProperties(const base::FilePath& profile_path, - CommandLine* command_line, + base::CommandLine* command_line, base::string16* name, base::FilePath* icon_path) = 0; diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.h b/chrome/browser/profiles/profile_shortcut_manager_win.h index a2bb5d8..215178c 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.h +++ b/chrome/browser/profiles/profile_shortcut_manager_win.h @@ -63,7 +63,7 @@ class ProfileShortcutManagerWin : public ProfileShortcutManager, const base::FilePath& profile_path, const base::Callback<void(bool)>& callback) OVERRIDE; virtual void GetShortcutProperties(const base::FilePath& profile_path, - CommandLine* command_line, + base::CommandLine* command_line, base::string16* name, base::FilePath* icon_path) OVERRIDE; diff --git a/chrome/browser/service_process/service_process_control.h b/chrome/browser/service_process/service_process_control.h index 2e33145..eedd4a3 100644 --- a/chrome/browser/service_process/service_process_control.h +++ b/chrome/browser/service_process/service_process_control.h @@ -23,7 +23,9 @@ #include "ipc/ipc_listener.h" #include "ipc/ipc_sender.h" +namespace base { class CommandLine; +} namespace cloud_print { struct CloudPrintProxyInfo; @@ -132,7 +134,7 @@ class ServiceProcessControl : public IPC::Sender, class Launcher : public base::RefCountedThreadSafe<ServiceProcessControl::Launcher> { public: - Launcher(ServiceProcessControl* process, CommandLine* cmd_line); + Launcher(ServiceProcessControl* process, base::CommandLine* cmd_line); // Execute the command line to start the process asynchronously. After the // command is executed |task| is called with the process handle on the UI // thread. @@ -152,7 +154,7 @@ class ServiceProcessControl : public IPC::Sender, void Notify(); void CloseProcessHandle(); ServiceProcessControl* process_; - scoped_ptr<CommandLine> cmd_line_; + scoped_ptr<base::CommandLine> cmd_line_; base::Closure notify_task_; bool launched_; uint32 retry_count_; diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index 2926522..27cdc7c 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -14,7 +14,9 @@ #include "ui/gfx/image/image_family.h" #include "url/gurl.h" +namespace base { class CommandLine; +} class ShellIntegration { public: @@ -160,7 +162,7 @@ class ShellIntegration { // login profile, for ChromeOS). // If |extension_app_id| is non-empty, the arguments use kAppId=<id>. // Otherwise, kApp=<url> is used. - static CommandLine CommandLineArgsForLauncher( + static base::CommandLine CommandLineArgsForLauncher( const GURL& url, const std::string& extension_app_id, const base::FilePath& profile_path); @@ -170,7 +172,7 @@ class ShellIntegration { // The new command line reuses the current process's user data directory and // profile. static void AppendProfileArgs(const base::FilePath& profile_path, - CommandLine* command_line); + base::CommandLine* command_line); #if defined(OS_WIN) // Generates an application user model ID (AppUserModelId) for a given app diff --git a/chrome/browser/shell_integration_linux.h b/chrome/browser/shell_integration_linux.h index 88dfc34..44f0b7c 100644 --- a/chrome/browser/shell_integration_linux.h +++ b/chrome/browser/shell_integration_linux.h @@ -13,6 +13,7 @@ #include "url/gurl.h" namespace base { +class CommandLine; class Environment; } @@ -97,12 +98,13 @@ std::string GetDesktopFileContents(const base::FilePath& chrome_exe_path, // Returns contents for .desktop file that executes command_line. This is a more // general form of GetDesktopFileContents. If |no_display| is true, the shortcut // will not be visible to the user in menus. -std::string GetDesktopFileContentsForCommand(const CommandLine& command_line, - const std::string& app_name, - const GURL& url, - const base::string16& title, - const std::string& icon_name, - bool no_display); +std::string GetDesktopFileContentsForCommand( + const base::CommandLine& command_line, + const std::string& app_name, + const GURL& url, + const base::string16& title, + const std::string& icon_name, + bool no_display); // Returns contents for .directory file named |title| with icon |icon_name|. If // |icon_name| is empty, will use the Chrome icon. diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.h b/chrome/browser/sync/profile_sync_components_factory_impl.h index ee9d9f5..ec41352 100644 --- a/chrome/browser/sync/profile_sync_components_factory_impl.h +++ b/chrome/browser/sync/profile_sync_components_factory_impl.h @@ -12,9 +12,11 @@ #include "chrome/browser/sync/profile_sync_components_factory.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" +class Profile; +namespace base { class CommandLine; -class Profile; +} namespace extensions { class ExtensionSystem; @@ -23,7 +25,7 @@ class ExtensionSystem; class ProfileSyncComponentsFactoryImpl : public ProfileSyncComponentsFactory { public: ProfileSyncComponentsFactoryImpl(Profile* profile, - CommandLine* command_line); + base::CommandLine* command_line); virtual ~ProfileSyncComponentsFactoryImpl(); virtual void RegisterDataTypes(ProfileSyncService* pss) OVERRIDE; @@ -74,7 +76,7 @@ class ProfileSyncComponentsFactoryImpl : public ProfileSyncComponentsFactory { void RegisterCommonDataTypes(ProfileSyncService* pss); Profile* profile_; - CommandLine* command_line_; + base::CommandLine* command_line_; // Set on the UI thread (since extensions::ExtensionSystemFactory is // non-threadsafe); accessed on both the UI and FILE threads in // GetSyncableServiceForType. diff --git a/chrome/browser/sync/test/integration/migration_test.cc b/chrome/browser/sync/test/integration/migration_test.cc index 07ff3de..58ca300 100644 --- a/chrome/browser/sync/test/integration/migration_test.cc +++ b/chrome/browser/sync/test/integration/migration_test.cc @@ -515,7 +515,7 @@ class MigrationReconfigureTest : public MigrationTwoClientTest { public: MigrationReconfigureTest() {} - virtual void SetUpCommandLine(CommandLine* cl) OVERRIDE { + virtual void SetUpCommandLine(base::CommandLine* cl) OVERRIDE { AddTestSwitches(cl); // Do not add optional datatypes. } diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index 8e381ae..3c9ca3a 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc @@ -137,7 +137,7 @@ SyncTest::SyncTest(TestType test_type) SyncTest::~SyncTest() {} void SyncTest::SetUp() { - CommandLine* cl = CommandLine::ForCurrentProcess(); + base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); if (cl->HasSwitch(switches::kPasswordFileForTest)) { ReadPasswordFile(); } else if (cl->HasSwitch(switches::kSyncUserForTest) && @@ -210,12 +210,12 @@ void SyncTest::TearDown() { TearDownLocalTestServer(); } -void SyncTest::SetUpCommandLine(CommandLine* cl) { +void SyncTest::SetUpCommandLine(base::CommandLine* cl) { AddTestSwitches(cl); AddOptionalTypesToCommandLine(cl); } -void SyncTest::AddTestSwitches(CommandLine* cl) { +void SyncTest::AddTestSwitches(base::CommandLine* cl) { // Disable non-essential access of external network resources. if (!cl->HasSwitch(switches::kDisableBackgroundNetworking)) cl->AppendSwitch(switches::kDisableBackgroundNetworking); @@ -229,7 +229,7 @@ void SyncTest::AddTestSwitches(CommandLine* cl) { cl->AppendSwitch(switches::kDisableSyncPriorityPreferences); } -void SyncTest::AddOptionalTypesToCommandLine(CommandLine* cl) {} +void SyncTest::AddOptionalTypesToCommandLine(base::CommandLine* cl) {} // static Profile* SyncTest::MakeProfile(const base::FilePath::StringType name) { @@ -414,7 +414,7 @@ void SyncTest::TearDownInProcessBrowserTestFixture() { } void SyncTest::ReadPasswordFile() { - CommandLine* cl = CommandLine::ForCurrentProcess(); + base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); password_file_ = cl->GetSwitchValuePath(switches::kPasswordFileForTest); if (password_file_.empty()) LOG(FATAL) << "Can't run live server test without specifying --" @@ -535,7 +535,7 @@ bool SyncTest::SetUpLocalPythonTestServer() { EXPECT_TRUE(sync_server_.Start()) << "Could not launch local python test server."; - CommandLine* cl = CommandLine::ForCurrentProcess(); + base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); if (server_type_ == LOCAL_PYTHON_SERVER) { std::string sync_service_url = sync_server_.GetURL("chromiumsync").spec(); cl->AppendSwitchASCII(switches::kSyncServiceURL, sync_service_url); @@ -569,13 +569,13 @@ bool SyncTest::SetUpLocalPythonTestServer() { } bool SyncTest::SetUpLocalTestServer() { - CommandLine* cl = CommandLine::ForCurrentProcess(); - CommandLine::StringType server_cmdline_string = cl->GetSwitchValueNative( - switches::kSyncServerCommandLine); - CommandLine::StringVector server_cmdline_vector; - CommandLine::StringType delimiters(FILE_PATH_LITERAL(" ")); + base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); + base::CommandLine::StringType server_cmdline_string = + cl->GetSwitchValueNative(switches::kSyncServerCommandLine); + base::CommandLine::StringVector server_cmdline_vector; + base::CommandLine::StringType delimiters(FILE_PATH_LITERAL(" ")); Tokenize(server_cmdline_string, delimiters, &server_cmdline_vector); - CommandLine server_cmdline(server_cmdline_vector); + base::CommandLine server_cmdline(server_cmdline_vector); base::LaunchOptions options; #if defined(OS_WIN) options.start_hidden = true; @@ -625,7 +625,7 @@ bool SyncTest::WaitForTestServerToStart(base::TimeDelta wait, int intervals) { } bool SyncTest::IsTestServerRunning() { - CommandLine* cl = CommandLine::ForCurrentProcess(); + base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); GURL sync_url_status(sync_url.append("/healthz")); SyncServerStatusChecker delegate; diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h index 6313c25..3e7d12b 100644 --- a/chrome/browser/sync/test/integration/sync_test.h +++ b/chrome/browser/sync/test/integration/sync_test.h @@ -21,11 +21,13 @@ #include "sync/test/fake_server/fake_server.h" #include "sync/test/local_sync_test_server.h" - -class CommandLine; class Profile; class ProfileSyncServiceHarness; +namespace base { +class CommandLine; +} + namespace net { class FakeURLFetcherFactory; class ProxyConfig; @@ -120,7 +122,7 @@ class SyncTest : public InProcessBrowserTest { virtual void TearDown() OVERRIDE; // Sets up command line flags required for sync tests. - virtual void SetUpCommandLine(CommandLine* cl) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* cl) OVERRIDE; // Used to get the number of sync clients used by a test. int num_clients() WARN_UNUSED_RESULT { return num_clients_; } @@ -237,11 +239,11 @@ class SyncTest : public InProcessBrowserTest { protected: // Add custom switches needed for running the test. - virtual void AddTestSwitches(CommandLine* cl); + virtual void AddTestSwitches(base::CommandLine* cl); // Append the command line switches to enable experimental types that aren't // on by default yet. - virtual void AddOptionalTypesToCommandLine(CommandLine* cl); + virtual void AddOptionalTypesToCommandLine(base::CommandLine* cl); // InProcessBrowserTest override. Destroys all the sync clients and sync // profiles created by a test. diff --git a/chrome/browser/ui/app_list/app_list_service.h b/chrome/browser/ui/app_list/app_list_service.h index 4ee6604..91fbe7f 100644 --- a/chrome/browser/ui/app_list/app_list_service.h +++ b/chrome/browser/ui/app_list/app_list_service.h @@ -13,11 +13,11 @@ #include "ui/gfx/native_widget_types.h" class AppListControllerDelegate; -class CommandLine; class PrefRegistrySimple; class Profile; namespace base { +class CommandLine; class FilePath; } @@ -51,7 +51,7 @@ class AppListService { static void RegisterPrefs(PrefRegistrySimple* registry); - static void RecordShowTimings(const CommandLine& command_line); + static void RecordShowTimings(const base::CommandLine& command_line); // Indicates that |callback| should be called next time the app list is // painted. diff --git a/chrome/browser/ui/app_list/app_list_service_disabled.cc b/chrome/browser/ui/app_list/app_list_service_disabled.cc index 484358d..4e7b5d1 100644 --- a/chrome/browser/ui/app_list/app_list_service_disabled.cc +++ b/chrome/browser/ui/app_list/app_list_service_disabled.cc @@ -66,4 +66,4 @@ void AppListService::InitAll(Profile* initial_profile) {} void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} // static -void AppListService::RecordShowTimings(const CommandLine& command_line) {} +void AppListService::RecordShowTimings(const base::CommandLine& command_line) {} diff --git a/chrome/browser/ui/app_list/app_list_service_impl.h b/chrome/browser/ui/app_list/app_list_service_impl.h index 213da34..55660cd 100644 --- a/chrome/browser/ui/app_list/app_list_service_impl.h +++ b/chrome/browser/ui/app_list/app_list_service_impl.h @@ -31,7 +31,7 @@ class AppListServiceImpl : public AppListService, virtual ~AppListServiceImpl(); // Constructor used for testing. - AppListServiceImpl(const CommandLine& command_line, + AppListServiceImpl(const base::CommandLine& command_line, PrefService* local_state, scoped_ptr<ProfileStore> profile_store, scoped_ptr<KeepAliveService> keep_alive_service); @@ -83,7 +83,7 @@ class AppListServiceImpl : public AppListService, scoped_ptr<ProfileStore> profile_store_; base::WeakPtrFactory<AppListServiceImpl> weak_factory_; - CommandLine command_line_; + base::CommandLine command_line_; PrefService* local_state_; scoped_ptr<ProfileLoader> profile_loader_; diff --git a/chrome/browser/ui/extensions/application_launch.h b/chrome/browser/ui/extensions/application_launch.h index 280d549..e18211a 100644 --- a/chrome/browser/ui/extensions/application_launch.h +++ b/chrome/browser/ui/extensions/application_launch.h @@ -14,9 +14,12 @@ #include "url/gurl.h" class Browser; -class CommandLine; class Profile; +namespace base { +class CommandLine; +} + namespace content { class WebContents; } @@ -72,7 +75,7 @@ struct AppLaunchParams { // If non-empty, information from the command line may be passed on to the // application. - CommandLine command_line; + base::CommandLine command_line; // If non-empty, the current directory from which any relative paths on the // command line should be expanded from. diff --git a/chrome/browser/ui/libgtk2ui/gtk2_util.h b/chrome/browser/ui/libgtk2ui/gtk2_util.h index d58038d..20daa6e 100644 --- a/chrome/browser/ui/libgtk2ui/gtk2_util.h +++ b/chrome/browser/ui/libgtk2ui/gtk2_util.h @@ -8,10 +8,10 @@ #include <gtk/gtk.h> #include <string> -class CommandLine; class SkBitmap; namespace base { +class CommandLine; class Environment; } @@ -21,7 +21,7 @@ class Accelerator; namespace libgtk2ui { -void GtkInitFromCommandLine(const CommandLine& command_line); +void GtkInitFromCommandLine(const base::CommandLine& command_line); // Returns the name of the ".desktop" file associated with our running process. std::string GetDesktopName(base::Environment* env); diff --git a/chrome/browser/ui/panels/base_panel_browser_test.h b/chrome/browser/ui/panels/base_panel_browser_test.h index bd5a10d4..abe638f 100644 --- a/chrome/browser/ui/panels/base_panel_browser_test.h +++ b/chrome/browser/ui/panels/base_panel_browser_test.h @@ -55,7 +55,7 @@ class BasePanelBrowserTest : public InProcessBrowserTest { // tests to ensure we still have coverage on the bots. bool SkipTestIfCompizWM(); - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpOnMainThread() OVERRIDE; protected: diff --git a/chrome/browser/ui/startup/startup_browser_creator.h b/chrome/browser/ui/startup/startup_browser_creator.h index 8496d2b..9cef54f 100644 --- a/chrome/browser/ui/startup/startup_browser_creator.h +++ b/chrome/browser/ui/startup/startup_browser_creator.h @@ -18,10 +18,13 @@ #include "url/gurl.h" class Browser; -class CommandLine; class GURL; class PrefService; +namespace base { +class CommandLine; +} + // class containing helpers for BrowserMain to spin up a new instance and // initialize the profile. class StartupBrowserCreator { @@ -37,7 +40,7 @@ class StartupBrowserCreator { // This function is equivalent to ProcessCommandLine but should only be // called during actual process startup. - bool Start(const CommandLine& cmd_line, + bool Start(const base::CommandLine& cmd_line, const base::FilePath& cur_dir, Profile* last_used_profile, const Profiles& last_opened_profiles, @@ -54,7 +57,7 @@ class StartupBrowserCreator { // |startup_profile_dir| is the directory that contains the profile that the // command line arguments will be executed under. static void ProcessCommandLineAlreadyRunning( - const CommandLine& command_line, + const base::CommandLine& command_line, const base::FilePath& cur_dir, const base::FilePath& startup_profile_dir); @@ -72,7 +75,7 @@ class StartupBrowserCreator { // implies that the directory of the executable should be used. // |process_startup| indicates whether this is the first browser. // |is_first_run| indicates that this is a new profile. - bool LaunchBrowser(const CommandLine& command_line, + bool LaunchBrowser(const base::CommandLine& command_line, Profile* profile, const base::FilePath& cur_dir, chrome::startup::IsProcessStartup is_process_startup, @@ -85,7 +88,7 @@ class StartupBrowserCreator { static bool WasRestarted(); static SessionStartupPref GetSessionStartupPref( - const CommandLine& command_line, + const base::CommandLine& command_line, Profile* profile); void set_is_default_browser_dialog_suppressed(bool new_value) { @@ -121,11 +124,11 @@ class StartupBrowserCreator { // Returns the list of URLs to open from the command line. The returned // vector is empty if the user didn't specify any URLs on the command line. static std::vector<GURL> GetURLsFromCommandLine( - const CommandLine& command_line, + const base::CommandLine& command_line, const base::FilePath& cur_dir, Profile* profile); - static bool ProcessCmdLineImpl(const CommandLine& command_line, + static bool ProcessCmdLineImpl(const base::CommandLine& command_line, const base::FilePath& cur_dir, bool process_startup, Profile* last_used_profile, @@ -135,7 +138,7 @@ class StartupBrowserCreator { // Callback after a profile has been created. static void ProcessCommandLineOnProfileCreated( - const CommandLine& command_line, + const base::CommandLine& command_line, const base::FilePath& cur_dir, Profile* profile, Profile::CreateStatus status); @@ -173,6 +176,6 @@ bool HasPendingUncleanExit(Profile* profile); // Returns the path that contains the profile that should be loaded on process // startup. base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, - const CommandLine& command_line); + const base::CommandLine& command_line); #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h index a5ae4585..b50c9c7 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.h +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h @@ -16,11 +16,11 @@ #include "url/gurl.h" class Browser; -class CommandLine; class Profile; class StartupBrowserCreator; namespace base { +class CommandLine; class FilePath; } @@ -45,10 +45,10 @@ class StartupBrowserCreatorImpl { // second one is always called when the browser starts even if it is not // the first run. |is_first_run| indicates that this is a new profile. StartupBrowserCreatorImpl(const base::FilePath& cur_dir, - const CommandLine& command_line, + const base::CommandLine& command_line, chrome::startup::IsFirstRun is_first_run); StartupBrowserCreatorImpl(const base::FilePath& cur_dir, - const CommandLine& command_line, + const base::CommandLine& command_line, StartupBrowserCreator* browser_creator, chrome::startup::IsFirstRun is_first_run); ~StartupBrowserCreatorImpl(); @@ -159,7 +159,7 @@ class StartupBrowserCreatorImpl { const std::vector<GURL>& startup_urls); const base::FilePath cur_dir_; - const CommandLine& command_line_; + const base::CommandLine& command_line_; Profile* profile_; StartupBrowserCreator* browser_creator_; bool is_first_run_; diff --git a/chrome/browser/ui/webui/bidi_checker_web_ui_test.h b/chrome/browser/ui/webui/bidi_checker_web_ui_test.h index 02c38b9..0082e10 100644 --- a/chrome/browser/ui/webui/bidi_checker_web_ui_test.h +++ b/chrome/browser/ui/webui/bidi_checker_web_ui_test.h @@ -34,7 +34,7 @@ class WebUIBidiCheckerBrowserTest : public WebUIBrowserTest { private: // The command line args used to run the test before being changed in SetUp(). - CommandLine::StringVector argv_; + base::CommandLine::StringVector argv_; }; // Base class for BidiChecker-based tests that run with an LTR UI. diff --git a/chrome/browser/ui/webui/downloads_ui_browsertest.h b/chrome/browser/ui/webui/downloads_ui_browsertest.h index d38ee1e..6272e87 100644 --- a/chrome/browser/ui/webui/downloads_ui_browsertest.h +++ b/chrome/browser/ui/webui/downloads_ui_browsertest.h @@ -24,7 +24,7 @@ class DownloadsUIBrowserTest : public WebUIBrowserTest { class DownloadsWebUIForSupervisedUsersTest : public DownloadsUIBrowserTest { public: // InProcessBrowserTest overrides: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_UI_BROWSERTEST_H_ diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h index 17830d1..252a22c 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h @@ -23,7 +23,7 @@ class NetInternalsTest : public WebUIBrowserTest { class MessageHandler; // InProcessBrowserTest overrides. - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpOnMainThread() OVERRIDE; // WebUIBrowserTest implementation. diff --git a/chrome/common/crash_keys.h b/chrome/common/crash_keys.h index 99a581c..dd378fb 100644 --- a/chrome/common/crash_keys.h +++ b/chrome/common/crash_keys.h @@ -11,7 +11,9 @@ #include "base/debug/crash_logging.h" +namespace base { class CommandLine; +} namespace crash_keys { @@ -23,7 +25,7 @@ size_t RegisterChromeCrashKeys(); void SetClientID(const std::string& client_id); // Sets the kSwitch and kNumSwitches keys based on the given |command_line|. -void SetSwitchesFromCommandLine(const CommandLine* command_line); +void SetSwitchesFromCommandLine(const base::CommandLine* command_line); // Sets the list of active experiment/variations info. void SetVariationsList(const std::vector<std::string>& variations); diff --git a/chrome/common/logging_chrome.h b/chrome/common/logging_chrome.h index 91cd276..5fb8724 100644 --- a/chrome/common/logging_chrome.h +++ b/chrome/common/logging_chrome.h @@ -11,9 +11,8 @@ #include "base/logging.h" #include "base/time/time.h" -class CommandLine; - namespace base { +class CommandLine; class FilePath; } @@ -32,15 +31,15 @@ namespace logging { // normally appear for assertions and crashes, and makes any catchable // errors (namely assertions) available via GetSilencedErrorCount() // and GetSilencedError(). -void InitChromeLogging(const CommandLine& command_line, +void InitChromeLogging(const base::CommandLine& command_line, OldFileDeletionState delete_old_log_file); #if defined(OS_CHROMEOS) // Get the log file location. -base::FilePath GetSessionLogFile(const CommandLine& command_line); +base::FilePath GetSessionLogFile(const base::CommandLine& command_line); // Redirects chrome logging to the appropriate session log dir. -void RedirectChromeLogging(const CommandLine& command_line); +void RedirectChromeLogging(const base::CommandLine& command_line); #endif // Call when done using logging for Chrome. diff --git a/chrome/common/service_process_util.h b/chrome/common/service_process_util.h index a85f4df..fb18a47 100644 --- a/chrome/common/service_process_util.h +++ b/chrome/common/service_process_util.h @@ -14,7 +14,6 @@ #include "base/process/process.h" #include "ipc/ipc_channel_handle.h" -class CommandLine; class MultiProcessLock; #if defined(OS_MACOSX) @@ -26,6 +25,7 @@ class NSString; #endif namespace base { +class CommandLine; class MessageLoopProxy; } @@ -138,7 +138,7 @@ class ServiceProcessState { struct StateData; StateData* state_; scoped_ptr<base::SharedMemory> shared_mem_service_data_; - scoped_ptr<CommandLine> autorun_command_line_; + scoped_ptr<base::CommandLine> autorun_command_line_; }; #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h index 2e03e46..c1d02b9 100644 --- a/chrome/common/service_process_util_posix.h +++ b/chrome/common/service_process_util_posix.h @@ -23,8 +23,11 @@ MultiProcessLock* TakeServiceRunningLock(bool waiting); #include "base/files/file_path_watcher.h" #include "base/mac/scoped_cftyperef.h" +namespace base { class CommandLine; -CFDictionaryRef CreateServiceProcessLaunchdPlist(CommandLine* cmd_line, +} + +CFDictionaryRef CreateServiceProcessLaunchdPlist(base::CommandLine* cmd_line, bool for_auto_launch); #endif // OS_MACOSX diff --git a/chrome/common/switch_utils.h b/chrome/common/switch_utils.h index 83594d1..df91b2d5 100644 --- a/chrome/common/switch_utils.h +++ b/chrome/common/switch_utils.h @@ -14,7 +14,7 @@ namespace switches { // Remove the keys that we shouldn't pass through during restart. void RemoveSwitchesForAutostart( - std::map<std::string, CommandLine::StringType>* switches); + std::map<std::string, base::CommandLine::StringType>* switches); } // namespace switches diff --git a/chrome/installer/setup/install_worker.h b/chrome/installer/setup/install_worker.h index abcd1e5..41d1b04 100644 --- a/chrome/installer/setup/install_worker.h +++ b/chrome/installer/setup/install_worker.h @@ -13,10 +13,10 @@ #include <vector> class BrowserDistribution; -class CommandLine; class WorkItemList; namespace base { +class CommandLine; class FilePath; class Version; } @@ -161,7 +161,7 @@ void AddDeleteOldIELowRightsPolicyWorkItems( // Utility method currently shared between install.cc and install_worker.cc void AppendUninstallCommandLineFlags(const InstallerState& installer_state, const Product& product, - CommandLine* uninstall_cmd); + base::CommandLine* uninstall_cmd); // Refreshes the elevation policy on platforms where it is supported. void RefreshElevationPolicy(); diff --git a/chrome/installer/setup/setup_main.h b/chrome/installer/setup/setup_main.h index 45f92d84..5bcf457 100644 --- a/chrome/installer/setup/setup_main.h +++ b/chrome/installer/setup/setup_main.h @@ -10,9 +10,8 @@ #include "chrome/installer/util/util_constants.h" -class CommandLine; - namespace base { +class CommandLine; class FilePath; } // namespace base @@ -28,7 +27,7 @@ class MasterPreferences; // |true| if installation was delegated to a pre-existing higher version. InstallStatus InstallProductsHelper(const InstallationState& original_state, const base::FilePath& setup_exe, - const CommandLine& cmd_line, + const base::CommandLine& cmd_line, const MasterPreferences& prefs, const InstallerState& installer_state, base::FilePath* installer_directory, diff --git a/chrome/installer/setup/setup_util.h b/chrome/installer/setup/setup_util.h index 897bf67..1d91cb8 100644 --- a/chrome/installer/setup/setup_util.h +++ b/chrome/installer/setup/setup_util.h @@ -17,9 +17,8 @@ #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/util_constants.h" -class CommandLine; - namespace base { +class CommandLine; class FilePath; class Version; } @@ -79,7 +78,7 @@ bool GetExistingHigherInstaller(const InstallationState& original_state, // invoked |setup_exe| runs the newly installed product prior to exiting. // Returns true if |setup_exe| was launched, false otherwise. bool DeferToExistingInstall(const base::FilePath& setup_exe, - const CommandLine& command_line, + const base::CommandLine& command_line, const InstallerState& installer_state, const base::FilePath& temp_path, InstallStatus* install_status); @@ -111,7 +110,7 @@ void MigrateGoogleUpdateStateMultiToSingle( bool IsUninstallSuccess(InstallStatus install_status); // Returns true if |cmd_line| contains unsupported (legacy) switches. -bool ContainsUnsupportedSwitch(const CommandLine& cmd_line); +bool ContainsUnsupportedSwitch(const base::CommandLine& cmd_line); // Returns true if the processor is supported by chrome. bool IsProcessorSupported(); diff --git a/chrome/installer/setup/uninstall.h b/chrome/installer/setup/uninstall.h index 96c3411..2c9151c 100644 --- a/chrome/installer/setup/uninstall.h +++ b/chrome/installer/setup/uninstall.h @@ -13,9 +13,9 @@ #include "chrome/installer/util/util_constants.h" class BrowserDistribution; -class CommandLine; namespace base { +class CommandLine; class FilePath; } @@ -76,7 +76,7 @@ installer::InstallStatus UninstallProduct( const Product& dist, bool remove_all, bool force_uninstall, - const CommandLine& cmd_line); + const base::CommandLine& cmd_line); // Cleans up the installation directory after all uninstall operations have // completed. Depending on what products are remaining, setup.exe and the diff --git a/chrome/installer/util/chrome_app_host_operations.h b/chrome/installer/util/chrome_app_host_operations.h index cb954a5..bbd75ba 100644 --- a/chrome/installer/util/chrome_app_host_operations.h +++ b/chrome/installer/util/chrome_app_host_operations.h @@ -20,7 +20,7 @@ class ChromeAppHostOperations : public ProductOperations { virtual void ReadOptions(const MasterPreferences& prefs, std::set<base::string16>* options) const OVERRIDE; - virtual void ReadOptions(const CommandLine& uninstall_command, + virtual void ReadOptions(const base::CommandLine& uninstall_command, std::set<base::string16>* options) const OVERRIDE; virtual void AddKeyFiles( @@ -32,10 +32,10 @@ class ChromeAppHostOperations : public ProductOperations { std::vector<base::FilePath>* com_dll_list) const OVERRIDE; virtual void AppendProductFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual void AppendRenameFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual bool SetChannelFlags(const std::set<base::string16>& options, bool set, diff --git a/chrome/installer/util/chrome_binaries_operations.h b/chrome/installer/util/chrome_binaries_operations.h index d1015ed..929fa43 100644 --- a/chrome/installer/util/chrome_binaries_operations.h +++ b/chrome/installer/util/chrome_binaries_operations.h @@ -20,7 +20,7 @@ class ChromeBinariesOperations : public ProductOperations { virtual void ReadOptions(const MasterPreferences& prefs, std::set<base::string16>* options) const OVERRIDE; - virtual void ReadOptions(const CommandLine& uninstall_command, + virtual void ReadOptions(const base::CommandLine& uninstall_command, std::set<base::string16>* options) const OVERRIDE; virtual void AddKeyFiles( @@ -32,10 +32,10 @@ class ChromeBinariesOperations : public ProductOperations { std::vector<base::FilePath>* com_dll_list) const OVERRIDE; virtual void AppendProductFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual void AppendRenameFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual bool SetChannelFlags(const std::set<base::string16>& options, bool set, diff --git a/chrome/installer/util/chrome_browser_operations.h b/chrome/installer/util/chrome_browser_operations.h index e0e6e4d..06bdb55 100644 --- a/chrome/installer/util/chrome_browser_operations.h +++ b/chrome/installer/util/chrome_browser_operations.h @@ -19,7 +19,7 @@ class ChromeBrowserOperations : public ProductOperations { virtual void ReadOptions(const MasterPreferences& prefs, std::set<base::string16>* options) const OVERRIDE; - virtual void ReadOptions(const CommandLine& uninstall_command, + virtual void ReadOptions(const base::CommandLine& uninstall_command, std::set<base::string16>* options) const OVERRIDE; virtual void AddKeyFiles( @@ -31,10 +31,10 @@ class ChromeBrowserOperations : public ProductOperations { std::vector<base::FilePath>* com_dll_list) const OVERRIDE; virtual void AppendProductFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual void AppendRenameFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual bool SetChannelFlags(const std::set<base::string16>& options, bool set, diff --git a/chrome/installer/util/chrome_browser_sxs_operations.h b/chrome/installer/util/chrome_browser_sxs_operations.h index 5c82a3c..6a189d1a 100644 --- a/chrome/installer/util/chrome_browser_sxs_operations.h +++ b/chrome/installer/util/chrome_browser_sxs_operations.h @@ -17,10 +17,10 @@ class ChromeBrowserSxSOperations : public ChromeBrowserOperations { ChromeBrowserSxSOperations() {} virtual void AppendProductFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual void AppendRenameFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(ChromeBrowserSxSOperations); diff --git a/chrome/installer/util/chrome_frame_operations.h b/chrome/installer/util/chrome_frame_operations.h index fb35a07..497a151 100644 --- a/chrome/installer/util/chrome_frame_operations.h +++ b/chrome/installer/util/chrome_frame_operations.h @@ -19,7 +19,7 @@ class ChromeFrameOperations : public ProductOperations { virtual void ReadOptions(const MasterPreferences& prefs, std::set<base::string16>* options) const OVERRIDE; - virtual void ReadOptions(const CommandLine& uninstall_command, + virtual void ReadOptions(const base::CommandLine& uninstall_command, std::set<base::string16>* options) const OVERRIDE; virtual void AddKeyFiles( @@ -31,10 +31,10 @@ class ChromeFrameOperations : public ProductOperations { std::vector<base::FilePath>* com_dll_list) const OVERRIDE; virtual void AppendProductFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual void AppendRenameFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const OVERRIDE; + base::CommandLine* cmd_line) const OVERRIDE; virtual bool SetChannelFlags(const std::set<base::string16>& options, bool set, diff --git a/chrome/installer/util/fake_product_state.h b/chrome/installer/util/fake_product_state.h index 27946b7..8b6e866 100644 --- a/chrome/installer/util/fake_product_state.h +++ b/chrome/installer/util/fake_product_state.h @@ -23,7 +23,7 @@ class FakeProductState : public ProductState { } void clear_usagestats() { has_usagestats_ = false; } void SetUninstallProgram(const base::FilePath& setup_exe) { - uninstall_command_ = CommandLine(setup_exe); + uninstall_command_ = base::CommandLine(setup_exe); } void AddUninstallSwitch(const std::string& option) { uninstall_command_.AppendSwitch(option); diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h index 1ea0edd..5bc6b91 100644 --- a/chrome/installer/util/install_util.h +++ b/chrome/installer/util/install_util.h @@ -41,12 +41,12 @@ class InstallUtil { static void TriggerActiveSetupCommand(); // Launches given exe as admin on Vista. - static bool ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code); + static bool ExecuteExeAsAdmin(const base::CommandLine& cmd, DWORD* exit_code); // Reads the uninstall command for Chromium from registry and returns it. // If system_install is true the command is read from HKLM, otherwise // from HKCU. - static CommandLine GetChromeUninstallCmd( + static base::CommandLine GetChromeUninstallCmd( bool system_install, BrowserDistribution::Type distribution_type); @@ -173,7 +173,7 @@ class InstallUtil { // Composes |program| and |arguments| into |command_line|. static void MakeUninstallCommand(const base::string16& program, const base::string16& arguments, - CommandLine* command_line); + base::CommandLine* command_line); // Returns a string in the form YYYYMMDD of the current date. static base::string16 GetCurrentDate(); diff --git a/chrome/installer/util/installation_state.h b/chrome/installer/util/installation_state.h index 153760d2..28630cc 100644 --- a/chrome/installer/util/installation_state.h +++ b/chrome/installer/util/installation_state.h @@ -83,7 +83,9 @@ class ProductState { bool is_msi() const { return msi_; } // The command to uninstall the product; may be empty. - const CommandLine& uninstall_command() const { return uninstall_command_; } + const base::CommandLine& uninstall_command() const { + return uninstall_command_; + } // True if |uninstall_command| contains --multi-install. bool is_multi_install() const { return multi_install_; } @@ -107,7 +109,7 @@ class ProductState { std::wstring brand_; std::wstring rename_cmd_; std::wstring oem_install_; - CommandLine uninstall_command_; + base::CommandLine uninstall_command_; AppCommands commands_; DWORD eula_accepted_; DWORD usagestats_; diff --git a/chrome/installer/util/installation_validator.h b/chrome/installer/util/installation_validator.h index 3dcc583..46212f6 100644 --- a/chrome/installer/util/installation_validator.h +++ b/chrome/installer/util/installation_validator.h @@ -15,9 +15,8 @@ #include "base/strings/string16.h" #include "chrome/installer/util/browser_distribution.h" -class CommandLine; - namespace base { +class CommandLine; class FilePath; } @@ -231,12 +230,12 @@ class InstallationValidator { const base::string16& purpose, bool* is_valid); static void ValidateCommandExpectations(const ProductContext& ctx, - const CommandLine& command, + const base::CommandLine& command, const SwitchExpectations& expected, const base::string16& source, bool* is_valid); static void ValidateUninstallCommand(const ProductContext& ctx, - const CommandLine& command, + const base::CommandLine& command, const base::string16& source, bool* is_valid); static void ValidateRenameCommand(const ProductContext& ctx, diff --git a/chrome/installer/util/installer_state.h b/chrome/installer/util/installer_state.h index fd65574..7b22cf6 100644 --- a/chrome/installer/util/installer_state.h +++ b/chrome/installer/util/installer_state.h @@ -23,7 +23,9 @@ #include <windows.h> // NOLINT #endif +namespace base { class CommandLine; +} namespace installer { @@ -73,7 +75,7 @@ class InstallerState { explicit InstallerState(Level level); // Initializes this object based on the current operation. - void Initialize(const CommandLine& command_line, + void Initialize(const base::CommandLine& command_line, const MasterPreferences& prefs, const InstallationState& machine_state); diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h index b068b46..83f1150 100644 --- a/chrome/installer/util/master_preferences.h +++ b/chrome/installer/util/master_preferences.h @@ -85,7 +85,7 @@ class MasterPreferences { // is present in the command line. // The options from the preference file and command line are merged, with the // ones from the command line taking precedence in case of a conflict. - explicit MasterPreferences(const CommandLine& cmd_line); + explicit MasterPreferences(const base::CommandLine& cmd_line); // Parses a specific preferences file and does not merge any command line // switches with the distribution dictionary. @@ -191,7 +191,7 @@ class MasterPreferences { static const MasterPreferences& ForCurrentProcess(); protected: - void InitializeFromCommandLine(const CommandLine& cmd_line); + void InitializeFromCommandLine(const base::CommandLine& cmd_line); // Initializes the instance from a given JSON string, returning true if the // string was successfully parsed. diff --git a/chrome/installer/util/product.h b/chrome/installer/util/product.h index 9ff763b..4e70b42 100644 --- a/chrome/installer/util/product.h +++ b/chrome/installer/util/product.h @@ -14,7 +14,9 @@ #include "chrome/installer/util/shell_util.h" #include "chrome/installer/util/util_constants.h" +namespace base { class CommandLine; +} namespace installer { @@ -40,7 +42,8 @@ class Product { void InitializeFromPreferences(const MasterPreferences& prefs); - void InitializeFromUninstallCommand(const CommandLine& uninstall_command); + void InitializeFromUninstallCommand( + const base::CommandLine& uninstall_command); BrowserDistribution* distribution() const { return distribution_; @@ -98,7 +101,7 @@ class Product { // NOTE: The 'options' CommandLine object should only contain parameters. // The program part will be ignored. bool LaunchChromeAndWait(const base::FilePath& application_path, - const CommandLine& options, + const base::CommandLine& options, int32* exit_code) const; // Sets the boolean MSI marker for this installation if set is true or clears @@ -117,10 +120,10 @@ class Product { void AddComDllList(std::vector<base::FilePath>* com_dll_list) const; // See ProductOperations::AppendProductFlags. - void AppendProductFlags(CommandLine* command_line) const; + void AppendProductFlags(base::CommandLine* command_line) const; // See ProductOperations::AppendRenameFlags. - void AppendRenameFlags(CommandLine* command_line) const; + void AppendRenameFlags(base::CommandLine* command_line) const; // See Productoperations::SetChannelFlags. bool SetChannelFlags(bool set, ChannelInfo* channel_info) const; diff --git a/chrome/installer/util/product_operations.h b/chrome/installer/util/product_operations.h index bb6c208..d84a1b9 100644 --- a/chrome/installer/util/product_operations.h +++ b/chrome/installer/util/product_operations.h @@ -15,7 +15,10 @@ #include "chrome/installer/util/util_constants.h" class BrowserDistribution; + +namespace base { class CommandLine; +} namespace installer { @@ -35,7 +38,7 @@ class ProductOperations { std::set<base::string16>* options) const = 0; // Reads product-specific options from |command|, adding them to |options|. - virtual void ReadOptions(const CommandLine& command, + virtual void ReadOptions(const base::CommandLine& command, std::set<base::string16>* options) const = 0; // A key-file is a file such as a DLL on Windows that is expected to be in use @@ -59,11 +62,11 @@ class ProductOperations { // required for product-specific uninstall commands, but are of use for any // invocation of setup.exe for the product. virtual void AppendProductFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const = 0; + base::CommandLine* cmd_line) const = 0; // Given a command line, appends the set of product-specific rename flags. virtual void AppendRenameFlags(const std::set<base::string16>& options, - CommandLine* cmd_line) const = 0; + base::CommandLine* cmd_line) const = 0; // Adds or removes product-specific flags in |channel_info|. Returns true if // |channel_info| is modified. diff --git a/chrome/installer/util/user_experiment.h b/chrome/installer/util/user_experiment.h index 98fce5f..7856f77 100644 --- a/chrome/installer/util/user_experiment.h +++ b/chrome/installer/util/user_experiment.h @@ -11,9 +11,8 @@ #include "base/strings/string16.h" #include "chrome/installer/util/util_constants.h" -class CommandLine; - namespace base { +class CommandLine; class FilePath; } @@ -52,7 +51,7 @@ bool CreateExperimentDetails(int flavor, ExperimentDetails* experiment); // After an install or upgrade the user might qualify to participate in an // experiment. This function determines if the user qualifies and if so it // sets the wheels in motion or in simple cases does the experiment itself. -void LaunchBrowserUserExperiment(const CommandLine& base_command, +void LaunchBrowserUserExperiment(const base::CommandLine& base_command, InstallStatus status, bool system_level); diff --git a/chrome/service/service_process.h b/chrome/service/service_process.h index aa57987..61f6c02 100644 --- a/chrome/service/service_process.h +++ b/chrome/service/service_process.h @@ -17,16 +17,17 @@ class ServiceProcessPrefs; class ServiceIPCServer; -class CommandLine; class ServiceURLRequestContextGetter; class ServiceProcessState; +namespace base { +class CommandLine; +} + namespace net { class NetworkChangeNotifier; } -class CommandLine; - // The ServiceProcess does not inherit from ChildProcess because this // process can live independently of the browser process. // ServiceProcess Design Notes @@ -39,7 +40,7 @@ class ServiceProcess : public cloud_print::CloudPrintProxy::Client { // Initialize the ServiceProcess with the message loop that it should run on. // ServiceProcess takes ownership of |state|. bool Initialize(base::MessageLoopForUI* message_loop, - const CommandLine& command_line, + const base::CommandLine& command_line, ServiceProcessState* state); bool Teardown(); diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h index fd1fad9..855e2a7 100644 --- a/chrome/service/service_utility_process_host.h +++ b/chrome/service/service_utility_process_host.h @@ -19,9 +19,8 @@ #include "ipc/ipc_channel.h" #include "printing/pdf_render_settings.h" -class CommandLine; - namespace base { +class CommandLine; class MessageLoopProxy; class ScopedTempDir; } // namespace base @@ -133,7 +132,7 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { // TODO(sanjeevr): Determine whether we need to make the launch asynchronous. // |exposed_dir| is the path to tbe exposed to the sandbox. This is ignored // if |no_sandbox| is true. - bool Launch(CommandLine* cmd_line, + bool Launch(base::CommandLine* cmd_line, bool no_sandbox, const base::FilePath& exposed_dir); diff --git a/chrome/test/automation/proxy_launcher.h b/chrome/test/automation/proxy_launcher.h index b97b50a..8f1359c 100644 --- a/chrome/test/automation/proxy_launcher.h +++ b/chrome/test/automation/proxy_launcher.h @@ -51,7 +51,7 @@ class ProxyLauncher { base::Closure setup_profile_callback; // Command line to launch the browser. - CommandLine command; + base::CommandLine command; // Should we supply the testing channel id on the command line? bool include_testing_id; @@ -148,7 +148,7 @@ class ProxyLauncher { bool WaitForBrowserLaunch(bool wait_for_initial_loads) WARN_UNUSED_RESULT; // Prepare command line that will be used to launch the child browser process. - void PrepareTestCommandline(CommandLine* command_line, + void PrepareTestCommandline(base::CommandLine* command_line, bool include_testing_id); bool LaunchBrowserHelper(const LaunchState& state, diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h index add31c5..a64a47d 100644 --- a/chrome/test/base/in_process_browser_test.h +++ b/chrome/test/base/in_process_browser_test.h @@ -15,6 +15,9 @@ #include "testing/gtest/include/gtest/gtest.h" namespace base { + +class CommandLine; + #if defined(OS_MACOSX) namespace mac { class ScopedNSAutoreleasePool; @@ -29,7 +32,6 @@ class ScopedCOMInitializer; } // namespace base class Browser; -class CommandLine; class Profile; namespace content { @@ -155,7 +157,7 @@ class InProcessBrowserTest : public content::BrowserTestBase { // the command line isn't a concept that we support on the Mac; AppleEvents // are the Mac solution for the same need. Any test based on these functions // doesn't apply to the Mac. - CommandLine GetCommandLineForRelaunch(); + base::CommandLine GetCommandLineForRelaunch(); #endif #if defined(OS_MACOSX) @@ -184,7 +186,7 @@ class InProcessBrowserTest : public content::BrowserTestBase { // Prepare command line that will be used to launch the child browser process // with an in-process test. - void PrepareTestCommandLine(CommandLine* command_line); + void PrepareTestCommandLine(base::CommandLine* command_line); // Browser created from CreateBrowser. Browser* browser_; diff --git a/chrome/test/base/test_launcher_utils.h b/chrome/test/base/test_launcher_utils.h index 18d46b5..24bd23d 100644 --- a/chrome/test/base/test_launcher_utils.h +++ b/chrome/test/base/test_launcher_utils.h @@ -10,14 +10,16 @@ #include "base/compiler_specific.h" #include "base/files/file_path.h" +namespace base { class CommandLine; +} // A set of utilities for test code that launches separate processes. namespace test_launcher_utils { // Appends browser switches to provided |command_line| to be used // when running under tests. -void PrepareBrowserCommandLineForTests(CommandLine* command_line); +void PrepareBrowserCommandLineForTests(base::CommandLine* command_line); // Overrides the current process' user data dir. bool OverrideUserDataDir( diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h index d0771ed..497247d 100644 --- a/chrome/test/base/testing_profile.h +++ b/chrome/test/base/testing_profile.h @@ -41,7 +41,6 @@ class SpecialStoragePolicy; } class BrowserContextDependencyManager; -class CommandLine; class ExtensionSpecialStoragePolicy; class HostContentSettingsMap; class PrefServiceSyncable; diff --git a/chrome/test/chromedriver/capabilities.h b/chrome/test/chromedriver/capabilities.h index 1fea633..998c56a 100644 --- a/chrome/test/chromedriver/capabilities.h +++ b/chrome/test/chromedriver/capabilities.h @@ -18,10 +18,10 @@ #include "chrome/test/chromedriver/net/net_util.h" namespace base { +class CommandLine; class DictionaryValue; } -class CommandLine; class Status; class Switches { @@ -49,7 +49,7 @@ class Switches { size_t GetSize() const; - void AppendToCommandLine(CommandLine* command) const; + void AppendToCommandLine(base::CommandLine* command) const; std::string ToString() const; private: diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.h b/chrome/test/chromedriver/chrome/chrome_desktop_impl.h index f9c2ab6..c8e86a7 100644 --- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.h +++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.h @@ -30,7 +30,7 @@ class ChromeDesktopImpl : public ChromeImpl { ScopedVector<DevToolsEventListener>& devtools_event_listeners, scoped_ptr<PortReservation> port_reservation, base::ProcessHandle process, - const CommandLine& command, + const base::CommandLine& command, base::ScopedTempDir* user_data_dir, base::ScopedTempDir* extension_dir); virtual ~ChromeDesktopImpl(); @@ -51,11 +51,11 @@ class ChromeDesktopImpl : public ChromeImpl { // Overridden from ChromeImpl: virtual Status QuitImpl() OVERRIDE; - const CommandLine& command() const; + const base::CommandLine& command() const; private: base::ProcessHandle process_; - CommandLine command_; + base::CommandLine command_; base::ScopedTempDir user_data_dir_; base::ScopedTempDir extension_dir_; diff --git a/chrome/test/chromedriver/chrome_launcher.h b/chrome/test/chromedriver/chrome_launcher.h index 10077f8..c9dee2c 100644 --- a/chrome/test/chromedriver/chrome_launcher.h +++ b/chrome/test/chromedriver/chrome_launcher.h @@ -14,7 +14,6 @@ #include "chrome/test/chromedriver/capabilities.h" #include "chrome/test/chromedriver/net/sync_websocket_factory.h" -class CommandLine; class DevToolsEventListener; namespace base { diff --git a/chrome/test/data/webui/print_preview.h b/chrome/test/data/webui/print_preview.h index 0d4386c..599f4d5 100644 --- a/chrome/test/data/webui/print_preview.h +++ b/chrome/test/data/webui/print_preview.h @@ -14,7 +14,7 @@ class PrintPreviewWebUITest : public WebUIBrowserTest { private: // WebUIBrowserTest implementation. - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; DISALLOW_COPY_AND_ASSIGN(PrintPreviewWebUITest); }; diff --git a/chrome/test/mini_installer_test/installer_test_util.h b/chrome/test/mini_installer_test/installer_test_util.h index bda2617..c55106b 100644 --- a/chrome/test/mini_installer_test/installer_test_util.h +++ b/chrome/test/mini_installer_test/installer_test_util.h @@ -79,7 +79,7 @@ bool ValidateInstall( // Run and wait for command to finish. // Returns true if successful, otherwise false. -bool RunAndWaitForCommandToFinish(CommandLine command); +bool RunAndWaitForCommandToFinish(base::CommandLine command); } // namespace diff --git a/chrome/test/mini_installer_test/switch_builder.h b/chrome/test/mini_installer_test/switch_builder.h index 017c088..94d039f 100644 --- a/chrome/test/mini_installer_test/switch_builder.h +++ b/chrome/test/mini_installer_test/switch_builder.h @@ -16,7 +16,7 @@ class SwitchBuilder { SwitchBuilder(); ~SwitchBuilder(); - const CommandLine& GetSwitches() const; + const base::CommandLine& GetSwitches() const; SwitchBuilder& AddChrome(); SwitchBuilder& AddChromeFrame(); @@ -24,7 +24,7 @@ class SwitchBuilder { SwitchBuilder& AddSystemInstall(); private: - CommandLine switches_; + base::CommandLine switches_; DISALLOW_COPY_AND_ASSIGN(SwitchBuilder); }; diff --git a/chrome/test/nacl/nacl_browsertest_util.h b/chrome/test/nacl/nacl_browsertest_util.h index cff0970..b4ed58a 100644 --- a/chrome/test/nacl/nacl_browsertest_util.h +++ b/chrome/test/nacl/nacl_browsertest_util.h @@ -62,7 +62,7 @@ class NaClBrowserTestBase : public InProcessBrowserTest { NaClBrowserTestBase(); virtual ~NaClBrowserTestBase(); - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; @@ -127,7 +127,7 @@ class NaClBrowserTestPnacl : public NaClBrowserTestBase { // type is not available. class NaClBrowserTestPnaclDisabled : public NaClBrowserTestBase { public: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual base::FilePath::StringType Variant() OVERRIDE; diff --git a/chrome/test/perf/browser_perf_test.h b/chrome/test/perf/browser_perf_test.h index 8b723d1..250724c 100644 --- a/chrome/test/perf/browser_perf_test.h +++ b/chrome/test/perf/browser_perf_test.h @@ -7,7 +7,9 @@ #include "chrome/test/base/in_process_browser_test.h" +namespace base { class CommandLine; +} class BrowserPerfTest : public InProcessBrowserTest { public: @@ -16,7 +18,7 @@ class BrowserPerfTest : public InProcessBrowserTest { // Set up common browser perf test flags. Typically call down to this if // overridden. - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; // Prints IO performance data for use by perf graphs. void PrintIOPerfInfo(const std::string& test_name); diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc index 30fc4c8..0074c9f 100644 --- a/chrome/test/ppapi/ppapi_test.cc +++ b/chrome/test/ppapi/ppapi_test.cc @@ -50,7 +50,7 @@ const char library_name[] = "ppapi_tests.plugin"; const char library_name[] = "libppapi_tests.so"; #endif -void AddPrivateSwitches(CommandLine* command_line) { +void AddPrivateSwitches(base::CommandLine* command_line) { // For TestRequestOSFileHandle. command_line->AppendSwitch(switches::kUnlimitedStorage); command_line->AppendSwitchASCII(switches::kAllowNaClFileHandleAPI, @@ -142,7 +142,7 @@ void PPAPITestBase::SetUp() { InProcessBrowserTest::SetUp(); } -void PPAPITestBase::SetUpCommandLine(CommandLine* command_line) { +void PPAPITestBase::SetUpCommandLine(base::CommandLine* command_line) { // The test sends us the result via a cookie. command_line->AppendSwitch(switches::kEnableFileCookies); @@ -272,7 +272,8 @@ std::string PPAPITestBase::StripPrefixes(const std::string& test_name) { void PPAPITestBase::RunTestURL(const GURL& test_url) { #if defined(OS_WIN) && defined(USE_ASH) // PPAPITests are broken in Ash browser tests (http://crbug.com/263548). - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kAshBrowserTests)) { LOG(WARNING) << "PPAPITests are disabled for Ash browser tests."; return; } @@ -308,7 +309,7 @@ GURL PPAPITestBase::GetTestURL( PPAPITest::PPAPITest() : in_process_(true) { } -void PPAPITest::SetUpCommandLine(CommandLine* command_line) { +void PPAPITest::SetUpCommandLine(base::CommandLine* command_line) { PPAPITestBase::SetUpCommandLine(command_line); // Append the switch to register the pepper plugin. @@ -334,7 +335,7 @@ std::string PPAPITest::BuildQuery(const std::string& base, return base::StringPrintf("%stestcase=%s", base.c_str(), test_case.c_str()); } -void PPAPIPrivateTest::SetUpCommandLine(CommandLine* command_line) { +void PPAPIPrivateTest::SetUpCommandLine(base::CommandLine* command_line) { PPAPITest::SetUpCommandLine(command_line); AddPrivateSwitches(command_line); } @@ -343,18 +344,19 @@ OutOfProcessPPAPITest::OutOfProcessPPAPITest() { in_process_ = false; } -void OutOfProcessPPAPITest::SetUpCommandLine(CommandLine* command_line) { +void OutOfProcessPPAPITest::SetUpCommandLine(base::CommandLine* command_line) { PPAPITest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); } -void OutOfProcessPPAPIPrivateTest::SetUpCommandLine(CommandLine* command_line) { +void OutOfProcessPPAPIPrivateTest::SetUpCommandLine( + base::CommandLine* command_line) { OutOfProcessPPAPITest::SetUpCommandLine(command_line); AddPrivateSwitches(command_line); } -void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { +void PPAPINaClTest::SetUpCommandLine(base::CommandLine* command_line) { RETURN_IF_NO_NACL(); PPAPITestBase::SetUpCommandLine(command_line); @@ -413,7 +415,8 @@ std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, test_case.c_str()); } -void PPAPIPrivateNaClNewlibTest::SetUpCommandLine(CommandLine* command_line) { +void PPAPIPrivateNaClNewlibTest::SetUpCommandLine( + base::CommandLine* command_line) { PPAPINaClNewlibTest::SetUpCommandLine(command_line); AddPrivateSwitches(command_line); } @@ -425,7 +428,8 @@ std::string PPAPINaClGLibcTest::BuildQuery(const std::string& base, test_case.c_str()); } -void PPAPIPrivateNaClGLibcTest::SetUpCommandLine(CommandLine* command_line) { +void PPAPIPrivateNaClGLibcTest::SetUpCommandLine( + base::CommandLine* command_line) { PPAPINaClGLibcTest::SetUpCommandLine(command_line); AddPrivateSwitches(command_line); } @@ -437,13 +441,14 @@ std::string PPAPINaClPNaClTest::BuildQuery(const std::string& base, test_case.c_str()); } -void PPAPIPrivateNaClPNaClTest::SetUpCommandLine(CommandLine* command_line) { +void PPAPIPrivateNaClPNaClTest::SetUpCommandLine( + base::CommandLine* command_line) { PPAPINaClPNaClTest::SetUpCommandLine(command_line); AddPrivateSwitches(command_line); } void PPAPINaClTestDisallowedSockets::SetUpCommandLine( - CommandLine* command_line) { + base::CommandLine* command_line) { PPAPITestBase::SetUpCommandLine(command_line); base::FilePath plugin_lib; diff --git a/chrome/test/ppapi/ppapi_test.h b/chrome/test/ppapi/ppapi_test.h index e55daf1..ef76639 100644 --- a/chrome/test/ppapi/ppapi_test.h +++ b/chrome/test/ppapi/ppapi_test.h @@ -41,7 +41,7 @@ class PPAPITestBase : public InProcessBrowserTest { // InProcessBrowserTest: virtual void SetUp() OVERRIDE; - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual void SetUpOnMainThread() OVERRIDE; virtual std::string BuildQuery(const std::string& base, @@ -99,7 +99,7 @@ class PPAPITest : public PPAPITestBase { public: PPAPITest(); - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual std::string BuildQuery(const std::string& base, const std::string& test_case) OVERRIDE; @@ -109,7 +109,7 @@ class PPAPITest : public PPAPITestBase { class PPAPIPrivateTest : public PPAPITest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; // Variant of PPAPITest that runs plugins out-of-process to test proxy @@ -118,18 +118,18 @@ class OutOfProcessPPAPITest : public PPAPITest { public: OutOfProcessPPAPITest(); - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; class OutOfProcessPPAPIPrivateTest : public OutOfProcessPPAPITest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; // NaCl plugin test runner for Newlib runtime. class PPAPINaClTest : public PPAPITestBase { public: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; // PPAPITestBase overrides. virtual void RunTest(const std::string& test_case) OVERRIDE; virtual void RunTestAndReload(const std::string& test_case) OVERRIDE; @@ -152,7 +152,7 @@ class PPAPINaClNewlibTest : public PPAPINaClTest { class PPAPIPrivateNaClNewlibTest : public PPAPINaClNewlibTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; // NaCl plugin test runner for GNU-libc runtime. @@ -164,7 +164,7 @@ class PPAPINaClGLibcTest : public PPAPINaClTest { class PPAPIPrivateNaClGLibcTest : public PPAPINaClGLibcTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; // NaCl plugin test runner for the PNaCl + Newlib runtime. @@ -176,12 +176,12 @@ class PPAPINaClPNaClTest : public PPAPINaClTest { class PPAPIPrivateNaClPNaClTest : public PPAPINaClPNaClTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; }; class PPAPINaClTestDisallowedSockets : public PPAPITestBase { public: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; virtual std::string BuildQuery(const std::string& base, const std::string& test_case) OVERRIDE; diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index b364116..12c442f 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -71,7 +71,7 @@ class UITestBase { // Launches the browser with the given command line. // TODO(phajdan.jr): Make LaunchBrowser private. - void LaunchBrowser(const CommandLine& cmdline, bool clear_profile); + void LaunchBrowser(const base::CommandLine& cmdline, bool clear_profile); // Exits out browser instance. void QuitBrowser(); @@ -279,7 +279,7 @@ class UITestBase { base::FilePath test_data_directory_; // Command to launch the browser - CommandLine launch_arguments_; + base::CommandLine launch_arguments_; // The number of errors expected during the run (generally 0). size_t expected_errors_; |