summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 17:47:09 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 17:47:09 +0000
commitf1d8192134f870445ae76be8c16b1566981c9cce (patch)
tree99a0bc223c4e8a7715479f7c35cd95c8e85a2f98 /net
parent34877b3b302e3cb456a705b4b45dd72ae6947c79 (diff)
downloadchromium_src-f1d8192134f870445ae76be8c16b1566981c9cce.zip
chromium_src-f1d8192134f870445ae76be8c16b1566981c9cce.tar.gz
chromium_src-f1d8192134f870445ae76be8c16b1566981c9cce.tar.bz2
Move ASCIIToWide and ASCIIToUTF16 to utf_string_conversions.h. I've found it
weird that UTF8ToWide is in utf_string_conversions, but ASCIIToWide is in string_util.h. This should help some dependencies since string_util changes much more frequently than utf_string_conversions and fewer files will now need string_utils. Since this requires a lot of changes, this keeps a forward-declaration in string_util so I can update the entire project incrementally. This change updates base and net only. I removed some includes of string_util from header files in net. In particular, url_request_context which involved creating a new .cc file to implement a function (already virtual so there's no speed penalty). It turns out a lot of files were getting string_util from this include, so I had to update a bunch of random files to now explicitly include string_util.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3076013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/cookie_store.h3
-rw-r--r--net/base/net_log.cc1
-rw-r--r--net/base/transport_security_state.cc1
-rw-r--r--net/ftp/ftp_directory_listing_parser_ls.cc7
-rw-r--r--net/ftp/ftp_directory_listing_parser_netware.cc7
-rw-r--r--net/http/http_auth_controller.cc2
-rw-r--r--net/http/http_auth_filter.h1
-rw-r--r--net/http/http_auth_filter_win.h2
-rw-r--r--net/http/http_auth_handler_negotiate.cc2
-rw-r--r--net/net.gyp1
-rw-r--r--net/ocsp/nss_ocsp.cc3
-rw-r--r--net/socket_stream/socket_stream.cc1
-rw-r--r--net/spdy/spdy_session.cc1
-rw-r--r--net/url_request/url_request_context.cc11
-rw-r--r--net/url_request/url_request_context.h5
-rw-r--r--net/url_request/url_request_ftp_job.cc1
-rw-r--r--net/url_request/url_request_unittest.h1
-rw-r--r--net/websockets/websocket_job_unittest.cc1
18 files changed, 36 insertions, 15 deletions
diff --git a/net/base/cookie_store.h b/net/base/cookie_store.h
index 5c22bb0..2360c96 100644
--- a/net/base/cookie_store.h
+++ b/net/base/cookie_store.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#pragma once
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/ref_counted.h"
diff --git a/net/base/net_log.cc b/net/base/net_log.cc
index bc79a30..b86bb2c 100644
--- a/net/base/net_log.cc
+++ b/net/base/net_log.cc
@@ -4,6 +4,7 @@
#include "net/base/net_log.h"
#include "base/time.h"
+#include "base/utf_string_conversions.h"
#include "base/values.h"
namespace net {
diff --git a/net/base/transport_security_state.cc b/net/base/transport_security_state.cc
index 985a940..7bb1907 100644
--- a/net/base/transport_security_state.cc
+++ b/net/base/transport_security_state.cc
@@ -13,6 +13,7 @@
#include "base/string_number_conversions.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "googleurl/src/gurl.h"
#include "net/base/dns_util.h"
diff --git a/net/ftp/ftp_directory_listing_parser_ls.cc b/net/ftp/ftp_directory_listing_parser_ls.cc
index 969d26a..143a236 100644
--- a/net/ftp/ftp_directory_listing_parser_ls.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "net/ftp/ftp_directory_listing_parser_ls.h"
@@ -8,6 +8,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "net/ftp/ftp_util.h"
namespace {
diff --git a/net/ftp/ftp_directory_listing_parser_netware.cc b/net/ftp/ftp_directory_listing_parser_netware.cc
index eb6518c..59a579c 100644
--- a/net/ftp/ftp_directory_listing_parser_netware.cc
+++ b/net/ftp/ftp_directory_listing_parser_netware.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "net/ftp/ftp_directory_listing_parser_netware.h"
@@ -8,6 +8,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "net/ftp/ftp_util.h"
namespace {
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index 3f2d688..7f8e13c 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -4,7 +4,7 @@
#include "net/http/http_auth_controller.h"
-#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "net/base/host_resolver.h"
#include "net/base/net_util.h"
#include "net/http/http_auth_handler_factory.h"
diff --git a/net/http/http_auth_filter.h b/net/http/http_auth_filter.h
index f120b2a..5160513 100644
--- a/net/http/http_auth_filter.h
+++ b/net/http/http_auth_filter.h
@@ -10,7 +10,6 @@
#include <set>
#include <string>
-#include "base/string_util.h"
#include "net/http/http_auth.h"
#include "net/proxy/proxy_bypass_rules.h"
diff --git a/net/http/http_auth_filter_win.h b/net/http/http_auth_filter_win.h
index f201f65..3a25865 100644
--- a/net/http/http_auth_filter_win.h
+++ b/net/http/http_auth_filter_win.h
@@ -11,7 +11,7 @@
#include "build/build_config.h"
#if defined(OS_WIN)
-#include "base/string_util.h"
+#include "base/string16.h"
namespace net {
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index 889dea2..6986264 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -5,6 +5,8 @@
#include "net/http/http_auth_handler_negotiate.h"
#include "base/logging.h"
+#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "net/base/address_family.h"
#include "net/base/host_resolver.h"
#include "net/base/net_errors.h"
diff --git a/net/net.gyp b/net/net.gyp
index c98a86c..e5dbc99 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -530,6 +530,7 @@
'url_request/url_request.h',
'url_request/url_request_about_job.cc',
'url_request/url_request_about_job.h',
+ 'url_request/url_request_context.cc',
'url_request/url_request_context.h',
'url_request/url_request_data_job.cc',
'url_request/url_request_data_job.h',
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc
index 702baa6..bd6a70b 100644
--- a/net/ocsp/nss_ocsp.cc
+++ b/net/ocsp/nss_ocsp.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,6 +19,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/singleton.h"
+#include "base/string_util.h"
#include "base/thread.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index 6e7f270..fe3afeb 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "net/base/auth.h"
#include "net/base/host_resolver.h"
#include "net/base/io_buffer.h"
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index e9ecec3..d195fb9 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -13,6 +13,7 @@
#include "base/stl_util-inl.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "base/time.h"
#include "base/values.h"
#include "net/base/connection_type_histograms.h"
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc
new file mode 100644
index 0000000..b39843a
--- /dev/null
+++ b/net/url_request/url_request_context.cc
@@ -0,0 +1,11 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/url_request/url_request_context.h"
+
+#include "base/string_util.h"
+
+const std::string& URLRequestContext::GetUserAgent(const GURL& url) const {
+ return EmptyString();
+}
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index 3f6cc64..94cc29f 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -13,7 +13,6 @@
#include "base/non_thread_safe.h"
#include "base/ref_counted.h"
-#include "base/string_util.h"
#include "net/base/cookie_store.h"
#include "net/base/host_resolver.h"
#include "net/base/net_log.h"
@@ -104,9 +103,7 @@ class URLRequestContext
// Gets the UA string to use for the given URL. Pass an invalid URL (such as
// GURL()) to get the default UA string. Subclasses should override this
// method to provide a UA string.
- virtual const std::string& GetUserAgent(const GURL& url) const {
- return EmptyString();
- }
+ virtual const std::string& GetUserAgent(const GURL& url) const;
// In general, referrer_charset is not known when URLRequestContext is
// constructed. So, we need a setter.
diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc
index e59f79f..37d6ab0 100644
--- a/net/url_request/url_request_ftp_job.cc
+++ b/net/url_request/url_request_ftp_job.cc
@@ -6,6 +6,7 @@
#include "base/compiler_specific.h"
#include "base/message_loop.h"
+#include "base/utf_string_conversions.h"
#include "net/base/auth.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h
index 1a6faf6..19105f0 100644
--- a/net/url_request/url_request_unittest.h
+++ b/net/url_request/url_request_unittest.h
@@ -18,6 +18,7 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/process_util.h"
+#include "base/string_util.h"
#include "base/string16.h"
#include "base/thread.h"
#include "base/time.h"
diff --git a/net/websockets/websocket_job_unittest.cc b/net/websockets/websocket_job_unittest.cc
index 0136759..736be61 100644
--- a/net/websockets/websocket_job_unittest.cc
+++ b/net/websockets/websocket_job_unittest.cc
@@ -6,6 +6,7 @@
#include <vector>
#include "base/ref_counted.h"
+#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_policy.h"
#include "net/base/cookie_store.h"