From f1d8192134f870445ae76be8c16b1566981c9cce Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Sat, 31 Jul 2010 17:47:09 +0000 Subject: 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 --- net/url_request/url_request_context.cc | 11 +++++++++++ net/url_request/url_request_context.h | 5 +---- net/url_request/url_request_ftp_job.cc | 1 + net/url_request/url_request_unittest.h | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 net/url_request/url_request_context.cc (limited to 'net/url_request') 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" -- cgit v1.1