diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 21:08:39 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 21:08:39 +0000 |
commit | 8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee (patch) | |
tree | 5c07a9d5091a56c6d5a1a2b98ec10d19ae3c20e9 /webkit/tools | |
parent | f8dce00e633d5ffde45e008fb8f51d5a76942f6b (diff) | |
download | chromium_src-8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee.zip chromium_src-8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee.tar.gz chromium_src-8a16266e66a38bc1bfc6b00893c2a7c8cf8c55ee.tar.bz2 |
Move StringPiece into the base namespace. It is colliding
with the StringPiece class in icu4.2, which is a problem
when trying to use the system version of icu.
Review URL: http://codereview.chromium.org/193072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_shell.h | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 12 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 10 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 15 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_worker/test_worker_main.cc | 4 |
5 files changed, 26 insertions, 22 deletions
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h index b99cbea..5d14c55 100644 --- a/webkit/tools/test_shell/test_shell.h +++ b/webkit/tools/test_shell/test_shell.h @@ -47,10 +47,13 @@ typedef std::list<gfx::NativeWindow> WindowList; struct WebPreferences; -class StringPiece; class TestNavigationEntry; class TestNavigationController; +namespace base { +class StringPiece; +} + class TestShell { public: struct TestParams { @@ -268,7 +271,7 @@ public: static void ShowStartupDebuggingDialog(); // This is called indirectly by the network layer to access resources. - static StringPiece NetResourceProvider(int key); + static base::StringPiece NetResourceProvider(int key); protected: bool Initialize(const GURL& starting_url); diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index 87e80a5..848751d 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -181,7 +181,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode) { // fontconfig only knows how to load font config configs from a file name, so // we write to a temp file. - StringPiece font_config_xml; + base::StringPiece font_config_xml; g_resource_data_pack->Get(IDR_LINUX_FONT_CONFIG, &font_config_xml); FilePath fontconfig_path; if (!file_util::CreateTemporaryFile(&fontconfig_path)) { @@ -270,7 +270,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode) { } // Also load the layout-test-specific "Ahem" font. - StringPiece ahem_font; + base::StringPiece ahem_font; g_resource_data_pack->Get(IDR_AHEM_FONT, &ahem_font); g_ahem_path = new FilePath; if (!file_util::CreateTemporaryFile(g_ahem_path)) { @@ -632,8 +632,8 @@ void TestShell::ShowStartupDebuggingDialog() { } // static -StringPiece TestShell::NetResourceProvider(int key) { - StringPiece res; +base::StringPiece TestShell::NetResourceProvider(int key) { + base::StringPiece res; g_resource_data_pack->Get(key, &res); return res; } @@ -643,7 +643,7 @@ StringPiece TestShell::NetResourceProvider(int key) { namespace webkit_glue { string16 GetLocalizedString(int message_id) { - StringPiece res; + base::StringPiece res; if (!g_resource_data_pack->Get(message_id, &res)) { LOG(FATAL) << "failed to load webkit string with id " << message_id; } @@ -652,7 +652,7 @@ string16 GetLocalizedString(int message_id) { res.length() / 2); } -StringPiece GetDataResource(int resource_id) { +base::StringPiece GetDataResource(int resource_id) { switch (resource_id) { case IDR_FEED_PREVIEW: // It is necessary to return a feed preview template that contains diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index 5566380..299876a 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -609,9 +609,9 @@ void TestShell::ShowStartupDebuggingDialog() { [alert runModal]; } -StringPiece TestShell::NetResourceProvider(int key) { +base::StringPiece TestShell::NetResourceProvider(int key) { // TODO(port): Return the requested resource. - return StringPiece(); + return base::StringPiece(); } //----------------------------------------------------------------------------- @@ -619,7 +619,7 @@ StringPiece TestShell::NetResourceProvider(int key) { namespace webkit_glue { string16 GetLocalizedString(int message_id) { - StringPiece res; + base::StringPiece res; if (!g_resource_data_pack->Get(message_id, &res)) { LOG(FATAL) << "failed to load webkit string with id " << message_id; } @@ -628,7 +628,7 @@ string16 GetLocalizedString(int message_id) { res.length() / 2); } -StringPiece GetDataResource(int resource_id) { +base::StringPiece GetDataResource(int resource_id) { switch (resource_id) { case IDR_BROKENIMAGE: { // Use webkit's broken image icon (16x16) @@ -678,7 +678,7 @@ StringPiece GetDataResource(int resource_id) { break; } - return StringPiece(); + return base::StringPiece(); } void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc index e097b25..2bde111 100644 --- a/webkit/tools/test_shell/test_shell_win.cc +++ b/webkit/tools/test_shell/test_shell_win.cc @@ -126,16 +126,17 @@ FilePath GetResourcesFilePath() { return path.AppendASCII("resources"); } -static StringPiece GetRawDataResource(HMODULE module, int resource_id) { +static base::StringPiece GetRawDataResource(HMODULE module, int resource_id) { void* data_ptr; size_t data_size; return base::GetDataResourceFromModule(module, resource_id, &data_ptr, - &data_size) ? - StringPiece(static_cast<char*>(data_ptr), data_size) : StringPiece(); + &data_size) + ? base::StringPiece(static_cast<char*>(data_ptr), data_size) + : base::StringPiece(); } // This is called indirectly by the network layer to access resources. -StringPiece NetResourceProvider(int key) { +base::StringPiece NetResourceProvider(int key) { return GetRawDataResource(::GetModuleHandle(NULL), key); } @@ -655,7 +656,7 @@ void TestShell::ShowStartupDebuggingDialog() { } // static -StringPiece TestShell::NetResourceProvider(int key) { +base::StringPiece TestShell::NetResourceProvider(int key) { return GetRawDataResource(::GetModuleHandle(NULL), key); } @@ -677,7 +678,7 @@ string16 GetLocalizedString(int message_id) { } // TODO(tc): Convert this to using resources from test_shell.rc. -StringPiece GetDataResource(int resource_id) { +base::StringPiece GetDataResource(int resource_id) { switch (resource_id) { case IDR_BROKENIMAGE: { // Use webkit's broken image icon (16x16) @@ -730,7 +731,7 @@ StringPiece GetDataResource(int resource_id) { break; } - return StringPiece(); + return base::StringPiece(); } HCURSOR LoadCursor(int cursor_id) { diff --git a/webkit/tools/test_shell/test_worker/test_worker_main.cc b/webkit/tools/test_shell/test_worker/test_worker_main.cc index 1002fbe..94c966d 100644 --- a/webkit/tools/test_shell/test_worker/test_worker_main.cc +++ b/webkit/tools/test_shell/test_worker/test_worker_main.cc @@ -166,8 +166,8 @@ string16 GetLocalizedString(int message_id) { return EmptyString16(); } -StringPiece GetDataResource(int resource_id) { - return StringPiece(); +base::StringPiece GetDataResource(int resource_id) { + return base::StringPiece(); } void SetMediaPlayerAvailable(bool value) { |