summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 04:39:38 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 04:39:38 +0000
commit61c839f7ee945fa278ab415a0fbc790b023e65ad (patch)
tree72437ce47744b7e7fd868367ca9899899e252dcc /webkit
parentfdeae91eb3ac9cc18e5969cc65f3efb593005734 (diff)
downloadchromium_src-61c839f7ee945fa278ab415a0fbc790b023e65ad.zip
chromium_src-61c839f7ee945fa278ab415a0fbc790b023e65ad.tar.gz
chromium_src-61c839f7ee945fa278ab415a0fbc790b023e65ad.tar.bz2
Some easy cleanup to remove unnecessary config.h and glue_util.h dependencies.
R=yaar BUG=none TEST=none Review URL: http://codereview.chromium.org/402032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/bookmarklet_unittest.cc7
-rw-r--r--webkit/glue/cpp_variant_unittest.cc13
-rw-r--r--webkit/glue/iframe_redirect_unittest.cc4
-rw-r--r--webkit/glue/mimetype_unittest.cc4
-rw-r--r--webkit/glue/multipart_response_delegate.cc19
-rw-r--r--webkit/glue/password_form_dom_manager.cc3
-rw-r--r--webkit/glue/webpasswordautocompletelistener_impl.cc9
7 files changed, 18 insertions, 41 deletions
diff --git a/webkit/glue/bookmarklet_unittest.cc b/webkit/glue/bookmarklet_unittest.cc
index e6718c7..4da9838 100644
--- a/webkit/glue/bookmarklet_unittest.cc
+++ b/webkit/glue/bookmarklet_unittest.cc
@@ -2,16 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "config.h"
-
-#undef LOG
-
-#include "testing/gtest/include/gtest/gtest.h"
-
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/tools/test_shell/test_shell_test.h"
namespace {
diff --git a/webkit/glue/cpp_variant_unittest.cc b/webkit/glue/cpp_variant_unittest.cc
index 877ae7c..43c78de 100644
--- a/webkit/glue/cpp_variant_unittest.cc
+++ b/webkit/glue/cpp_variant_unittest.cc
@@ -2,17 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "config.h"
-
#include "base/compiler_specific.h"
-
+#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "webkit/glue/cpp_variant.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-MSVC_PUSH_WARNING_LEVEL(0);
-#include "npruntime_priv.h" // for NPN_InitializeVariantWithStringCopy
-MSVC_POP_WARNING();
using WebKit::WebBindings;
@@ -252,7 +245,7 @@ TEST(CppVariantTest, SetsTypeAndValueFromNPVariant) {
NPString np_ascii_str = { "1st test value",
static_cast<uint32_t>(strlen("1st test value")) };
- _NPN_InitializeVariantWithStringCopy(&np, &np_ascii_str);
+ WebBindings::initializeVariantWithStringCopy(&np, &np_ascii_str);
cpp.Set(np);
CheckString("1st test value", cpp);
WebBindings::releaseVariantValue(&np);
@@ -263,7 +256,7 @@ TEST(CppVariantTest, SetsTypeAndValueFromNPVariant) {
NPString np_intl_str = { "\xce\xb1\xe4\xb8\x80\xf0\x90\x90\x84",
static_cast<uint32_t>(strlen(
"\xce\xb1\xe4\xb8\x80\xf0\x90\x90\x84")) };
- _NPN_InitializeVariantWithStringCopy(&np, &np_intl_str);
+ WebBindings::initializeVariantWithStringCopy(&np, &np_intl_str);
cpp.Set(np);
CheckString("\xce\xb1\xe4\xb8\x80\xf0\x90\x90\x84", cpp);
WebBindings::releaseVariantValue(&np);
diff --git a/webkit/glue/iframe_redirect_unittest.cc b/webkit/glue/iframe_redirect_unittest.cc
index 4865bd8..9170d19 100644
--- a/webkit/glue/iframe_redirect_unittest.cc
+++ b/webkit/glue/iframe_redirect_unittest.cc
@@ -2,12 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "config.h"
-
#include <string>
-#undef LOG
-
#include "base/file_util.h"
#include "base/string_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h"
diff --git a/webkit/glue/mimetype_unittest.cc b/webkit/glue/mimetype_unittest.cc
index a0ac5a2..152d20d9 100644
--- a/webkit/glue/mimetype_unittest.cc
+++ b/webkit/glue/mimetype_unittest.cc
@@ -2,12 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "config.h"
-
#include <string>
-#undef LOG
-
#include "base/string_util.h"
#include "net/url_request/url_request_unittest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc
index 2306760..a9c60ca 100644
--- a/webkit/glue/multipart_response_delegate.cc
+++ b/webkit/glue/multipart_response_delegate.cc
@@ -12,7 +12,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h"
-#include "webkit/glue/glue_util.h"
using WebKit::WebHTTPHeaderVisitor;
using WebKit::WebString;
@@ -41,7 +40,7 @@ class HeaderCopier : public WebHTTPHeaderVisitor {
: response_(response) {
}
virtual void visitHeader(const WebString& name, const WebString& value) {
- const std::string& name_utf8 = WebStringToStdString(name);
+ const std::string& name_utf8 = name.utf8();
for (size_t i = 0; i < arraysize(kReplaceHeaders); ++i) {
if (LowerCaseEqualsASCII(name_utf8, kReplaceHeaders[i]))
return;
@@ -214,8 +213,8 @@ bool MultipartResponseDelegate::ParseHeaders() {
net::HttpUtil::ParseContentType(content_type, &mime_type, &charset,
&has_charset);
WebURLResponse response(original_response_.url());
- response.setMIMEType(StdStringToWebString(mime_type));
- response.setTextEncodingName(StdStringToWebString(charset));
+ response.setMIMEType(WebString::fromUTF8(mime_type));
+ response.setTextEncodingName(WebString::fromUTF8(charset));
HeaderCopier copier(&response);
original_response_.visitHTTPHeaderFields(&copier);
@@ -224,8 +223,8 @@ bool MultipartResponseDelegate::ParseHeaders() {
std::string name(kReplaceHeaders[i]);
std::string value = net::GetSpecificHeader(headers, name);
if (!value.empty()) {
- response.setHTTPHeaderField(StdStringToWebString(name),
- StdStringToWebString(value));
+ response.setHTTPHeaderField(WebString::fromUTF8(name),
+ WebString::fromUTF8(value));
}
}
// Send the response!
@@ -255,8 +254,8 @@ size_t MultipartResponseDelegate::FindBoundary() {
bool MultipartResponseDelegate::ReadMultipartBoundary(
const WebURLResponse& response,
std::string* multipart_boundary) {
- std::string content_type = WebStringToStdString(
- response.httpHeaderField(WebString::fromUTF8("Content-Type")));
+ std::string content_type =
+ response.httpHeaderField(WebString::fromUTF8("Content-Type")).utf8();
size_t boundary_start_offset = content_type.find("boundary=");
if (boundary_start_offset == std::wstring::npos) {
@@ -286,8 +285,8 @@ bool MultipartResponseDelegate::ReadContentRanges(
int* content_range_lower_bound,
int* content_range_upper_bound) {
- std::string content_range = WebStringToStdString(
- response.httpHeaderField(WebString::fromUTF8("Content-Range")));
+ std::string content_range =
+ response.httpHeaderField(WebString::fromUTF8("Content-Range")).utf8();
size_t byte_range_lower_bound_start_offset = content_range.find(" ");
if (byte_range_lower_bound_start_offset == std::string::npos) {
diff --git a/webkit/glue/password_form_dom_manager.cc b/webkit/glue/password_form_dom_manager.cc
index 5c56d63..0ec4a71 100644
--- a/webkit/glue/password_form_dom_manager.cc
+++ b/webkit/glue/password_form_dom_manager.cc
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "webkit/glue/password_form_dom_manager.h"
#include "base/logging.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPasswordFormData.h"
-#include "webkit/glue/glue_util.h"
-#include "webkit/glue/password_form_dom_manager.h"
using WebKit::WebFormElement;
using WebKit::WebPasswordFormData;
diff --git a/webkit/glue/webpasswordautocompletelistener_impl.cc b/webkit/glue/webpasswordautocompletelistener_impl.cc
index a61d1ed..7f9b866 100644
--- a/webkit/glue/webpasswordautocompletelistener_impl.cc
+++ b/webkit/glue/webpasswordautocompletelistener_impl.cc
@@ -5,14 +5,13 @@
// This file provides the implementaiton of the password manager's autocomplete
// component.
-#include "base/string_util.h"
+#include "webkit/glue/webpasswordautocompletelistener_impl.h"
+#include "base/string_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webpasswordautocompletelistener_impl.h"
using namespace WebKit;
@@ -20,7 +19,7 @@ namespace webkit_glue {
WebInputElementDelegate::WebInputElementDelegate() {
}
-
+
WebInputElementDelegate::WebInputElementDelegate(WebInputElement& element)
: element_(element) {
}
@@ -49,7 +48,7 @@ void WebInputElementDelegate::RefreshAutofillPopup(
int default_suggestion_index) {
WebView* webview = element_.frame()->view();
if (webview)
- webview->applyAutofillSuggestions(element_, suggestions, 0);
+ webview->applyAutofillSuggestions(element_, suggestions, 0);
}