diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 22:18:37 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 22:18:37 +0000 |
commit | 711a353ad1d530fb05da259bf3b6011f6a974ecf (patch) | |
tree | 9e41a04cb0245620162cf1440eca12642d884278 | |
parent | 3f40a6ae6f0f2889a9ef4ad70c44c79590228f3a (diff) | |
download | chromium_src-711a353ad1d530fb05da259bf3b6011f6a974ecf.zip chromium_src-711a353ad1d530fb05da259bf3b6011f6a974ecf.tar.gz chromium_src-711a353ad1d530fb05da259bf3b6011f6a974ecf.tar.bz2 |
Get rid of std::wstring version of HasSwitch.
BUG=24672
TEST=trybots
Review URL: http://codereview.chromium.org/5649003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68650 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/command_line.cc | 7 | ||||
-rw-r--r-- | base/command_line.h | 7 | ||||
-rw-r--r-- | ceee/common/install_utils.cc | 4 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 2 | ||||
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/net/test_automation_provider.cc | 2 | ||||
-rw-r--r-- | chrome_frame/test/run_all_unittests.cc | 2 | ||||
-rw-r--r-- | gfx/canvas_direct2d_unittest.cc | 6 | ||||
-rw-r--r-- | media/tools/player_wtl/player_wtl.cc | 2 | ||||
-rw-r--r-- | net/tools/dump_cache/dump_cache.cc | 8 | ||||
-rw-r--r-- | skia/ext/vector_canvas_unittest.cc | 2 |
11 files changed, 15 insertions, 31 deletions
diff --git a/base/command_line.cc b/base/command_line.cc index 427bed4..70d6872 100644 --- a/base/command_line.cc +++ b/base/command_line.cc @@ -287,13 +287,6 @@ bool CommandLine::HasSwitch(const std::string& switch_string) const { return switches_.find(lowercased_switch) != switches_.end(); } -#if defined(OS_WIN) -// Deprecated; still temporarily available on Windows. -bool CommandLine::HasSwitch(const std::wstring& switch_string) const { - return HasSwitch(WideToASCII(switch_string)); -} -#endif - std::string CommandLine::GetSwitchValueASCII( const std::string& switch_string) const { CommandLine::StringType value = GetSwitchValueNative(switch_string); diff --git a/base/command_line.h b/base/command_line.h index a5bdd1a..df0293c 100644 --- a/base/command_line.h +++ b/base/command_line.h @@ -161,13 +161,6 @@ class CommandLine { void CopySwitchesFrom(const CommandLine& source, const char* const switches[], size_t count); - // APIs that work with wstrings are deprecated. - // TODO(evanm): remove all of these. -#if defined(OS_WIN) - // Deprecated on non-Windows. - bool HasSwitch(const std::wstring& switch_string) const; -#endif - private: friend class InProcessBrowserTest; diff --git a/ceee/common/install_utils.cc b/ceee/common/install_utils.cc index 25ea9c8..e737d5b 100644 --- a/ceee/common/install_utils.cc +++ b/ceee/common/install_utils.cc @@ -18,8 +18,8 @@ namespace installer_util { // TODO(joi@chromium.org) Move to chrome/installer/util_constants.h // when we refactor this logic to be in the installer rather than // on the registration entrypoints. - const wchar_t kEnableCeee[] = L"enable-ceee"; - const wchar_t kEnableFfCeee[] = L"enable-ff-ceee"; + const char kEnableCeee[] = "enable-ceee"; + const char kEnableFfCeee[] = "enable-ff-ceee"; } } diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 24f9179..39e8524 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -66,7 +66,7 @@ void InitializeBrowser(Browser* browser) { extern int BrowserMain(const MainFunctionParams&); -const wchar_t kUnitTestShowWindows[] = L"show-windows"; +const char kUnitTestShowWindows[] = "show-windows"; // Passed as value of kTestType. static const char kBrowserTestType[] = "browser"; diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index 76fd313..c5625c2 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -45,12 +45,12 @@ namespace { // A special command line switch to allow developers to manually launch the // browser and debug CF inside the browser. -const wchar_t kManualBrowserLaunch[] = L"manual-browser"; +const char kManualBrowserLaunch[] = "manual-browser"; // Pops up a message box after the test environment has been set up // and before tearing it down. Useful for when debugging tests and not // the test environment that's been set up. -const wchar_t kPromptAfterSetup[] = L"prompt-after-setup"; +const char kPromptAfterSetup[] = "prompt-after-setup"; const int kTestServerPort = 4666; // The test HTML we use to initialize Chrome Frame. diff --git a/chrome_frame/test/net/test_automation_provider.cc b/chrome_frame/test/net/test_automation_provider.cc index 2e7c76e..85246cc 100644 --- a/chrome_frame/test/net/test_automation_provider.cc +++ b/chrome_frame/test/net/test_automation_provider.cc @@ -14,7 +14,7 @@ namespace { // A special command line switch to just run the unit tests without CF in // the picture. Can be useful when the harness itself needs to be debugged. -const wchar_t kNoCfTestRun[] = L"no-cf-test-run"; +const char kNoCfTestRun[] = "no-cf-test-run"; bool CFTestsDisabled() { static bool switch_present = CommandLine::ForCurrentProcess()-> diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc index 2c90a70..1b2357e 100644 --- a/chrome_frame/test/run_all_unittests.cc +++ b/chrome_frame/test/run_all_unittests.cc @@ -23,7 +23,7 @@ class ChromeFrameUnittestsModule ChromeFrameUnittestsModule _AtlModule; -const wchar_t kNoRegistrationSwitch[] = L"no-registration"; +const char kNoRegistrationSwitch[] = "no-registration"; void PureCall() { __debugbreak(); diff --git a/gfx/canvas_direct2d_unittest.cc b/gfx/canvas_direct2d_unittest.cc index 3163cfe..eaa6a79 100644 --- a/gfx/canvas_direct2d_unittest.cc +++ b/gfx/canvas_direct2d_unittest.cc @@ -24,12 +24,13 @@ namespace { +const char kVisibleModeFlag[] = "d2d-canvas-visible"; + class TestWindow : public gfx::WindowImpl { public: static const int kWindowSize = 500; static const int kWindowPosition = 10; - static const wchar_t* kVisibleModeFlag; TestWindow() { if (CommandLine::ForCurrentProcess()->HasSwitch(kVisibleModeFlag)) @@ -75,9 +76,6 @@ class TestWindow : public gfx::WindowImpl { DISALLOW_COPY_AND_ASSIGN(TestWindow); }; -// static -const wchar_t* TestWindow::kVisibleModeFlag = L"d2d-canvas-visible"; - // Loads a png data blob from the data resources associated with this // executable, decodes it and returns a SkBitmap. SkBitmap LoadBitmapFromResources(int resource_id) { diff --git a/media/tools/player_wtl/player_wtl.cc b/media/tools/player_wtl/player_wtl.cc index 3bb8f9e..8fe9f1b 100644 --- a/media/tools/player_wtl/player_wtl.cc +++ b/media/tools/player_wtl/player_wtl.cc @@ -19,7 +19,7 @@ // See player_wtl.h to enable timing code by turning on TESTING macro. namespace switches { -const wchar_t* const kExit = L"exit"; +const char kExit[] = "exit"; } // namespace switches CAppModule g_module; diff --git a/net/tools/dump_cache/dump_cache.cc b/net/tools/dump_cache/dump_cache.cc index 9644aae..3561fb7 100644 --- a/net/tools/dump_cache/dump_cache.cc +++ b/net/tools/dump_cache/dump_cache.cc @@ -46,16 +46,16 @@ const char kInputPath[] = "input"; const char kOutputPath[] = "output"; // Dumps the file headers to stdout. -const wchar_t kDumpHeaders[] = L"dump-headers"; +const char kDumpHeaders[] = "dump-headers"; // Dumps all entries to stdout. -const wchar_t kDumpContents[] = L"dump-contents"; +const char kDumpContents[] = "dump-contents"; // Convert the cache to files. -const wchar_t kDumpToFiles[] = L"dump-to-files"; +const char kDumpToFiles[] = "dump-to-files"; // Upgrade an old version to the current one. -const wchar_t kUpgrade[] = L"upgrade"; +const char kUpgrade[] = "upgrade"; // Internal use: const char kSlave[] = "slave"; diff --git a/skia/ext/vector_canvas_unittest.cc b/skia/ext/vector_canvas_unittest.cc index b8b022a..7ca5e82 100644 --- a/skia/ext/vector_canvas_unittest.cc +++ b/skia/ext/vector_canvas_unittest.cc @@ -22,7 +22,7 @@ namespace skia { namespace { -const wchar_t* const kGenerateSwitch = L"vector-canvas-generate"; +const char kGenerateSwitch[] = "vector-canvas-generate"; // Lightweight HDC management. class Context { |