summaryrefslogtreecommitdiffstats
path: root/url
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-15 09:30:46 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-15 09:30:46 +0000
commit2244f0a5a874fd21da847fca2afc26dc16de7ccc (patch)
treecfdf45cc5eca43593ecd0e65eb1d2f4caf033f92 /url
parent0b7b7c213dec8e26c4c061f316e938923b1a7f02 (diff)
downloadchromium_src-2244f0a5a874fd21da847fca2afc26dc16de7ccc.zip
chromium_src-2244f0a5a874fd21da847fca2afc26dc16de7ccc.tar.gz
chromium_src-2244f0a5a874fd21da847fca2afc26dc16de7ccc.tar.bz2
Revert 193777 "url: Changes to make it build standalone."
url/url_canon_stdstring.h:65: error: undefined reference to 'vtable for url_canon::StdStringCanonOutput' > url: Changes to make it build standalone. > > - Update the gyp file. > - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory > name. > - Update the header include paths. > - Update the header include guards. > - Rename the target name from googleurl to url and googleurl_unittests to > url_unittests. > - Add missing OVERRIDEs where clang complains. > > BUG=229660 > TEST=url_unittests > R=brettw@chromium.org > > Review URL: https://codereview.chromium.org/14016005 TBR=tfarina@chromium.org Review URL: https://codereview.chromium.org/14264002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194155 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'url')
-rw-r--r--url/googleurl.gyp109
-rw-r--r--url/gurl.cc8
-rw-r--r--url/gurl.h14
-rw-r--r--url/gurl_unittest.cc6
-rw-r--r--url/url.gyp109
-rw-r--r--url/url_canon.h13
-rw-r--r--url/url_canon_etc.cc4
-rw-r--r--url/url_canon_filesystemurl.cc12
-rw-r--r--url/url_canon_fileurl.cc8
-rw-r--r--url/url_canon_host.cc4
-rw-r--r--url/url_canon_icu.cc5
-rw-r--r--url/url_canon_icu.h11
-rw-r--r--url/url_canon_internal.cc5
-rw-r--r--url/url_canon_internal.h8
-rw-r--r--url/url_canon_internal_file.h10
-rw-r--r--url/url_canon_ip.cc4
-rw-r--r--url/url_canon_ip.h12
-rw-r--r--url/url_canon_mailtourl.cc8
-rw-r--r--url/url_canon_path.cc6
-rw-r--r--url/url_canon_pathurl.cc4
-rw-r--r--url/url_canon_query.cc4
-rw-r--r--url/url_canon_relative.cc10
-rw-r--r--url/url_canon_stdstring.cc15
-rw-r--r--url/url_canon_stdstring.h20
-rw-r--r--url/url_canon_stdurl.cc4
-rw-r--r--url/url_canon_unittest.cc12
-rw-r--r--url/url_common.h7
-rw-r--r--url/url_file.h8
-rw-r--r--url/url_parse.cc8
-rw-r--r--url/url_parse.h8
-rw-r--r--url/url_parse_file.cc6
-rw-r--r--url/url_parse_internal.h8
-rw-r--r--url/url_parse_unittest.cc1
-rw-r--r--url/url_test_utils.h8
-rw-r--r--url/url_util.cc11
-rw-r--r--url/url_util.h12
-rw-r--r--url/url_util_internal.h10
-rw-r--r--url/url_util_unittest.cc10
38 files changed, 254 insertions, 268 deletions
diff --git a/url/googleurl.gyp b/url/googleurl.gyp
new file mode 100644
index 0000000..2f6f89a
--- /dev/null
+++ b/url/googleurl.gyp
@@ -0,0 +1,109 @@
+# Copyright (c) 2012 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.
+
+# TODO(mark): Upstream this file to googleurl.
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ 'target_name': 'googleurl',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../../base/base.gyp:base',
+ '../../third_party/icu/icu.gyp:icudata',
+ '../../third_party/icu/icu.gyp:icui18n',
+ '../../third_party/icu/icu.gyp:icuuc',
+ ],
+ 'sources': [
+ '../../googleurl/src/gurl.cc',
+ '../../googleurl/src/gurl.h',
+ '../../googleurl/src/url_canon.h',
+ '../../googleurl/src/url_canon_etc.cc',
+ '../../googleurl/src/url_canon_fileurl.cc',
+ '../../googleurl/src/url_canon_filesystemurl.cc',
+ '../../googleurl/src/url_canon_host.cc',
+ '../../googleurl/src/url_canon_icu.cc',
+ '../../googleurl/src/url_canon_icu.h',
+ '../../googleurl/src/url_canon_internal.cc',
+ '../../googleurl/src/url_canon_internal.h',
+ '../../googleurl/src/url_canon_internal_file.h',
+ '../../googleurl/src/url_canon_ip.cc',
+ '../../googleurl/src/url_canon_ip.h',
+ '../../googleurl/src/url_canon_mailtourl.cc',
+ '../../googleurl/src/url_canon_path.cc',
+ '../../googleurl/src/url_canon_pathurl.cc',
+ '../../googleurl/src/url_canon_query.cc',
+ '../../googleurl/src/url_canon_relative.cc',
+ '../../googleurl/src/url_canon_stdstring.h',
+ '../../googleurl/src/url_canon_stdurl.cc',
+ '../../googleurl/src/url_file.h',
+ '../../googleurl/src/url_parse.cc',
+ '../../googleurl/src/url_parse.h',
+ '../../googleurl/src/url_parse_file.cc',
+ '../../googleurl/src/url_parse_internal.h',
+ '../../googleurl/src/url_util.cc',
+ '../../googleurl/src/url_util.h',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../..',
+ ],
+ },
+ 'defines': [
+ 'FULL_FILESYSTEM_URL_SUPPORT=1',
+ ],
+ 'conditions': [
+ ['component=="shared_library"', {
+ 'defines': [
+ 'GURL_DLL',
+ 'GURL_IMPLEMENTATION=1',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'GURL_DLL',
+ ],
+ },
+ }],
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [4267, ],
+ },
+ {
+ 'target_name': 'googleurl_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ 'googleurl',
+ '../../base/base.gyp:base_i18n',
+ '../../base/base.gyp:run_all_unittests',
+ '../../testing/gtest.gyp:gtest',
+ '../../third_party/icu/icu.gyp:icuuc',
+ ],
+ 'sources': [
+ '../../googleurl/src/gurl_unittest.cc',
+ '../../googleurl/src/url_canon_unittest.cc',
+ '../../googleurl/src/url_parse_unittest.cc',
+ '../../googleurl/src/url_test_utils.h',
+ '../../googleurl/src/url_util_unittest.cc',
+ ],
+ 'defines': [
+ 'FULL_FILESYSTEM_URL_SUPPORT=1',
+ ],
+ 'conditions': [
+ ['os_posix==1 and OS!="mac" and OS!="ios"', {
+ 'conditions': [
+ ['linux_use_tcmalloc==1', {
+ 'dependencies': [
+ '../../base/allocator/allocator.gyp:allocator',
+ ],
+ }],
+ ],
+ }],
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [4267, ],
+ },
+ ],
+}
diff --git a/url/gurl.cc b/url/gurl.cc
index a938fa9..05f65da 100644
--- a/url/gurl.cc
+++ b/url/gurl.cc
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "url/gurl.h"
-
#ifdef WIN32
#include <windows.h>
#else
@@ -38,9 +36,11 @@
#include <algorithm>
#include <ostream>
+#include "googleurl/src/gurl.h"
+
#include "base/logging.h"
-#include "url/url_canon_stdstring.h"
-#include "url/url_util.h"
+#include "googleurl/src/url_canon_stdstring.h"
+#include "googleurl/src/url_util.h"
namespace {
diff --git a/url/gurl.h b/url/gurl.h
index 1f50266..76c595d 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -27,17 +27,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef URL_GURL_H_
-#define URL_GURL_H_
+#ifndef GOOGLEURL_SRC_GURL_H__
+#define GOOGLEURL_SRC_GURL_H__
#include <iosfwd>
#include <string>
#include "base/string16.h"
-#include "url/url_canon.h"
-#include "url/url_canon_stdstring.h"
-#include "url/url_common.h"
-#include "url/url_parse.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_stdstring.h"
+#include "googleurl/src/url_common.h"
+#include "googleurl/src/url_parse.h"
class GURL {
public:
@@ -389,4 +389,4 @@ class GURL {
// Stream operator so GURL can be used in assertion statements.
GURL_API std::ostream& operator<<(std::ostream& out, const GURL& url);
-#endif // URL_GURL_H_
+#endif // GOOGLEURL_SRC_GURL_H__
diff --git a/url/gurl_unittest.cc b/url/gurl_unittest.cc
index cb289cb..81177bd 100644
--- a/url/gurl_unittest.cc
+++ b/url/gurl_unittest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "googleurl/src/gurl.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "url/gurl.h"
-#include "url/url_canon.h"
-#include "url/url_test_utils.h"
// Some implementations of base/basictypes.h may define ARRAYSIZE.
// If it's not defined, we define it to the ARRAYSIZE_UNSAFE macro
diff --git a/url/url.gyp b/url/url.gyp
deleted file mode 100644
index 6247089..0000000
--- a/url/url.gyp
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright (c) 2012 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.
-
-{
- 'variables': {
- 'chromium_code': 1,
- },
- 'targets': [
- {
- 'target_name': 'url',
- 'type': '<(component)',
- 'dependencies': [
- '../base/base.gyp:base',
- '../third_party/icu/icu.gyp:icudata',
- '../third_party/icu/icu.gyp:icui18n',
- '../third_party/icu/icu.gyp:icuuc',
- ],
- 'sources': [
- 'gurl.cc',
- 'gurl.h',
- 'url_canon.h',
- 'url_canon_etc.cc',
- 'url_canon_fileurl.cc',
- 'url_canon_filesystemurl.cc',
- 'url_canon_host.cc',
- 'url_canon_icu.cc',
- 'url_canon_icu.h',
- 'url_canon_internal.cc',
- 'url_canon_internal.h',
- 'url_canon_internal_file.h',
- 'url_canon_ip.cc',
- 'url_canon_ip.h',
- 'url_canon_mailtourl.cc',
- 'url_canon_path.cc',
- 'url_canon_pathurl.cc',
- 'url_canon_query.cc',
- 'url_canon_relative.cc',
- 'url_canon_stdstring.cc',
- 'url_canon_stdstring.h',
- 'url_canon_stdurl.cc',
- 'url_file.h',
- 'url_parse.cc',
- 'url_parse.h',
- 'url_parse_file.cc',
- 'url_parse_internal.h',
- 'url_util.cc',
- 'url_util.h',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '..',
- ],
- },
- 'defines': [
- 'FULL_FILESYSTEM_URL_SUPPORT=1',
- ],
- 'conditions': [
- ['component=="shared_library"', {
- 'defines': [
- 'GURL_DLL',
- 'GURL_IMPLEMENTATION=1',
- ],
- 'direct_dependent_settings': {
- 'defines': [
- 'GURL_DLL',
- ],
- },
- }],
- ],
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- 'msvs_disabled_warnings': [4267, ],
- },
- {
- 'target_name': 'url_unittests',
- 'type': 'executable',
- 'dependencies': [
- 'url',
- '../base/base.gyp:base_i18n',
- '../base/base.gyp:run_all_unittests',
- '../testing/gtest.gyp:gtest',
- '../third_party/icu/icu.gyp:icuuc',
- ],
- 'sources': [
- 'gurl_unittest.cc',
- 'url_canon_unittest.cc',
- 'url_parse_unittest.cc',
- 'url_test_utils.h',
- 'url_util_unittest.cc',
- ],
- 'defines': [
- 'FULL_FILESYSTEM_URL_SUPPORT=1',
- ],
- 'conditions': [
- ['os_posix==1 and OS!="mac" and OS!="ios"', {
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ],
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- 'msvs_disabled_warnings': [4267, ],
- },
- ],
-}
diff --git a/url/url_canon.h b/url/url_canon.h
index bbb34af..00ae715 100644
--- a/url/url_canon.h
+++ b/url/url_canon.h
@@ -26,16 +26,15 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef GOOGLEURL_SRC_URL_CANON_H__
+#define GOOGLEURL_SRC_URL_CANON_H__
-#ifndef URL_URL_CANON_H_
-#define URL_URL_CANON_H_
-
-#include <stdlib.h>
#include <string.h>
+#include <stdlib.h>
#include "base/string16.h"
-#include "url/url_common.h"
-#include "url/url_parse.h"
+#include "googleurl/src/url_common.h"
+#include "googleurl/src/url_parse.h"
namespace url_canon {
@@ -910,4 +909,4 @@ GURL_API bool ResolveRelativeURL(const char* base_url,
} // namespace url_canon
-#endif // URL_URL_CANON_H_
+#endif // GOOGLEURL_SRC_URL_CANON_H__
diff --git a/url/url_canon_etc.cc b/url/url_canon_etc.cc
index 65c0678..318c906 100644
--- a/url/url_canon_etc.cc
+++ b/url/url_canon_etc.cc
@@ -31,8 +31,8 @@
#include <string.h>
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
namespace url_canon {
diff --git a/url/url_canon_filesystemurl.cc b/url/url_canon_filesystemurl.cc
index f00b653..7f79208 100644
--- a/url/url_canon_filesystemurl.cc
+++ b/url/url_canon_filesystemurl.cc
@@ -29,12 +29,12 @@
// Functions for canonicalizing "filesystem:file:" URLs.
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
-#include "url/url_file.h"
-#include "url/url_parse_internal.h"
-#include "url/url_util.h"
-#include "url/url_util_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_parse_internal.h"
+#include "googleurl/src/url_util.h"
+#include "googleurl/src/url_util_internal.h"
namespace url_canon {
diff --git a/url/url_canon_fileurl.cc b/url/url_canon_fileurl.cc
index 7d83df8..97023eb 100644
--- a/url/url_canon_fileurl.cc
+++ b/url/url_canon_fileurl.cc
@@ -29,10 +29,10 @@
// Functions for canonicalizing "file:" URLs.
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
-#include "url/url_file.h"
-#include "url/url_parse_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_parse_internal.h"
namespace url_canon {
diff --git a/url/url_canon_host.cc b/url/url_canon_host.cc
index f4c837d..6642004 100644
--- a/url/url_canon_host.cc
+++ b/url/url_canon_host.cc
@@ -28,8 +28,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "base/logging.h"
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
namespace url_canon {
diff --git a/url/url_canon_icu.cc b/url/url_canon_icu.cc
index 028b995..eaae643 100644
--- a/url/url_canon_icu.cc
+++ b/url/url_canon_icu.cc
@@ -35,9 +35,10 @@
#include <unicode/ucnv_cb.h>
#include <unicode/uidna.h>
+#include "googleurl/src/url_canon_icu.h"
+#include "googleurl/src/url_canon_internal.h" // for _itoa_s
+
#include "base/logging.h"
-#include "url/url_canon_icu.h"
-#include "url/url_canon_internal.h" // for _itoa_s
namespace url_canon {
diff --git a/url/url_canon_icu.h b/url/url_canon_icu.h
index 9f54f1a..e529fcb 100644
--- a/url/url_canon_icu.h
+++ b/url/url_canon_icu.h
@@ -29,11 +29,10 @@
// ICU integration functions.
-#ifndef URL_URL_CANON_ICU_H_
-#define URL_URL_CANON_ICU_H_
+#ifndef GOOGLEURL_SRC_URL_CANON_ICU_H__
+#define GOOGLEURL_SRC_URL_CANON_ICU_H__
-#include "base/compiler_specific.h"
-#include "url/url_canon.h"
+#include "googleurl/src/url_canon.h"
typedef struct UConverter UConverter;
@@ -52,7 +51,7 @@ class ICUCharsetConverter : public CharsetConverter {
GURL_API virtual void ConvertFromUTF16(const char16* input,
int input_len,
- CanonOutput* output) OVERRIDE;
+ CanonOutput* output);
private:
// The ICU converter, not owned by this class.
@@ -61,4 +60,4 @@ class ICUCharsetConverter : public CharsetConverter {
} // namespace url_canon
-#endif // URL_URL_CANON_ICU_H_
+#endif // GOOGLEURL_SRC_URL_CANON_ICU_H__
diff --git a/url/url_canon_internal.cc b/url/url_canon_internal.cc
index e74929b..cd791bb 100644
--- a/url/url_canon_internal.cc
+++ b/url/url_canon_internal.cc
@@ -27,13 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include <cstdio>
#include <errno.h>
#include <stdlib.h>
-
-#include <cstdio>
#include <string>
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon_internal.h"
namespace url_canon {
diff --git a/url/url_canon_internal.h b/url/url_canon_internal.h
index ce0ed4d..9165398 100644
--- a/url/url_canon_internal.h
+++ b/url/url_canon_internal.h
@@ -32,13 +32,13 @@
// templace bloat because everything is inlined when anybody calls any of our
// functions.
-#ifndef URL_URL_CANON_INTERNAL_H_
-#define URL_URL_CANON_INTERNAL_H_
+#ifndef GOOGLEURL_SRC_URL_CANON_INTERNAL_H__
+#define GOOGLEURL_SRC_URL_CANON_INTERNAL_H__
#include <stdlib.h>
#include "base/logging.h"
-#include "url/url_canon.h"
+#include "googleurl/src/url_canon.h"
namespace url_canon {
@@ -458,4 +458,4 @@ inline unsigned long long _strtoui64(const char* nptr,
} // namespace url_canon
-#endif // URL_URL_CANON_INTERNAL_H_
+#endif // GOOGLEURL_SRC_URL_CANON_INTERNAL_H__
diff --git a/url/url_canon_internal_file.h b/url/url_canon_internal_file.h
index c7a532c..63a9c5b 100644
--- a/url/url_canon_internal_file.h
+++ b/url/url_canon_internal_file.h
@@ -36,11 +36,11 @@
// *** This file must be included after url_canon_internal as we depend on some
// functions in it. ***
-#ifndef URL_URL_CANON_INTERNAL_FILE_H_
-#define URL_URL_CANON_INTERNAL_FILE_H_
+#ifndef GOOGLEURL_SRC_URL_CANON_INTERNAL_FILE_H__
+#define GOOGLEURL_SRC_URL_CANON_INTERNAL_FILE_H__
-#include "url/url_file.h"
-#include "url/url_parse_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_parse_internal.h"
using namespace url_canon;
@@ -154,4 +154,4 @@ static bool DoCanonicalizeFileURL(const URLComponentSource<CHAR>& source,
return success;
}
-#endif // URL_URL_CANON_INTERNAL_FILE_H_
+#endif // GOOGLEURL_SRC_URL_CANON_INTERNAL_FILE_H__
diff --git a/url/url_canon_ip.cc b/url/url_canon_ip.cc
index cd6e17d..1421e79 100644
--- a/url/url_canon_ip.cc
+++ b/url/url_canon_ip.cc
@@ -27,13 +27,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "url/url_canon_ip.h"
+#include "googleurl/src/url_canon_ip.h"
#include <stdlib.h>
#include "base/basictypes.h"
#include "base/logging.h"
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon_internal.h"
namespace url_canon {
diff --git a/url/url_canon_ip.h b/url/url_canon_ip.h
index d5dca67..a2900c6 100644
--- a/url/url_canon_ip.h
+++ b/url/url_canon_ip.h
@@ -27,13 +27,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef URL_URL_CANON_IP_H_
-#define URL_URL_CANON_IP_H_
+#ifndef GOOGLEURL_SRC_URL_CANON_IP_H__
+#define GOOGLEURL_SRC_URL_CANON_IP_H__
#include "base/string16.h"
-#include "url/url_canon.h"
-#include "url/url_common.h"
-#include "url/url_parse.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_common.h"
+#include "googleurl/src/url_parse.h"
namespace url_canon {
@@ -106,4 +106,4 @@ GURL_API bool IPv6AddressToNumber(const char16* spec,
} // namespace url_canon
-#endif // URL_URL_CANON_IP_H_
+#endif // GOOGLEURL_SRC_URL_CANON_IP_H__
diff --git a/url/url_canon_mailtourl.cc b/url/url_canon_mailtourl.cc
index a23f901..97868b8 100644
--- a/url/url_canon_mailtourl.cc
+++ b/url/url_canon_mailtourl.cc
@@ -29,10 +29,10 @@
// Functions for canonicalizing "mailto:" URLs.
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
-#include "url/url_file.h"
-#include "url/url_parse_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_parse_internal.h"
namespace url_canon {
diff --git a/url/url_canon_path.cc b/url/url_canon_path.cc
index 8edd5b9..d86643a 100644
--- a/url/url_canon_path.cc
+++ b/url/url_canon_path.cc
@@ -29,9 +29,9 @@
// Canonicalization functions for the paths of URLs.
#include "base/logging.h"
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
-#include "url/url_parse_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_parse_internal.h"
namespace url_canon {
diff --git a/url/url_canon_pathurl.cc b/url/url_canon_pathurl.cc
index 21469508..4a990c7 100644
--- a/url/url_canon_pathurl.cc
+++ b/url/url_canon_pathurl.cc
@@ -31,8 +31,8 @@
// of a URL, these are URLs that have no authority section, only a path. For
// example, "javascript:" and "data:".
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
namespace url_canon {
diff --git a/url/url_canon_query.cc b/url/url_canon_query.cc
index e7fb7e6..cee8774 100644
--- a/url/url_canon_query.cc
+++ b/url/url_canon_query.cc
@@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
// Query canonicalization in IE
// ----------------------------
diff --git a/url/url_canon_relative.cc b/url/url_canon_relative.cc
index 08e7c25..63630b4 100644
--- a/url/url_canon_relative.cc
+++ b/url/url_canon_relative.cc
@@ -30,11 +30,11 @@
// Canonicalizer functions for working with and resolving relative URLs.
#include "base/logging.h"
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
-#include "url/url_file.h"
-#include "url/url_parse_internal.h"
-#include "url/url_util_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_parse_internal.h"
+#include "googleurl/src/url_util_internal.h"
namespace url_canon {
diff --git a/url/url_canon_stdstring.cc b/url/url_canon_stdstring.cc
deleted file mode 100644
index 2cf7b9d..0000000
--- a/url/url_canon_stdstring.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 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 "url/url_canon_stdstring.h"
-
-namespace url_canon {
-
-void StdStringCanonOutput::Resize(int sz) {
- str_->resize(sz);
- buffer_ = str_->empty() ? NULL : &(*str_)[0];
- buffer_len_ = sz;
-}
-
-} // namespace url_canon
diff --git a/url/url_canon_stdstring.h b/url/url_canon_stdstring.h
index cb51f1d..21272e0 100644
--- a/url/url_canon_stdstring.h
+++ b/url/url_canon_stdstring.h
@@ -31,14 +31,11 @@
// strings. Because the canonicalizer tries not to be dependent on the STL,
// we have segregated it here.
-#ifndef URL_URL_CANON_STDSTRING_H_
-#define URL_URL_CANON_STDSTRING_H_
+#ifndef GOOGLEURL_SRC_URL_CANON_STDSTRING_H__
+#define GOOGLEURL_SRC_URL_CANON_STDSTRING_H__
#include <string>
-
-#include "base/compiler_specific.h"
-#include "url/url_canon.h"
-#include "url/url_common.h"
+#include "googleurl/src/url_canon.h"
namespace url_canon {
@@ -58,7 +55,7 @@ namespace url_canon {
//
// Therefore, the user should call Complete() before using the string that
// this class wrote into.
-class GURL_API StdStringCanonOutput : public CanonOutput {
+class StdStringCanonOutput : public CanonOutput {
public:
StdStringCanonOutput(std::string* str)
: CanonOutput(),
@@ -78,7 +75,11 @@ class GURL_API StdStringCanonOutput : public CanonOutput {
buffer_len_ = cur_len_;
}
- virtual void Resize(int sz) OVERRIDE;
+ virtual void Resize(int sz) {
+ str_->resize(sz);
+ buffer_ = str_->empty() ? NULL : &(*str_)[0];
+ buffer_len_ = sz;
+ }
protected:
std::string* str_;
@@ -129,4 +130,5 @@ class StdStringReplacements :
} // namespace url_canon
-#endif // URL_URL_CANON_STDSTRING_H_
+#endif // GOOGLEURL_SRC_URL_CANON_STDSTRING_H__
+
diff --git a/url/url_canon_stdurl.cc b/url/url_canon_stdurl.cc
index f7f1eaf..1e21a14 100644
--- a/url/url_canon_stdurl.cc
+++ b/url/url_canon_stdurl.cc
@@ -30,8 +30,8 @@
// Functions to canonicalize "standard" URLs, which are ones that have an
// authority section including a host name.
-#include "url/url_canon.h"
-#include "url/url_canon_internal.h"
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_internal.h"
namespace url_canon {
diff --git a/url/url_canon_unittest.cc b/url/url_canon_unittest.cc
index 55b349f..0c57f55 100644
--- a/url/url_canon_unittest.cc
+++ b/url/url_canon_unittest.cc
@@ -30,13 +30,13 @@
#include <errno.h>
#include <unicode/ucnv.h>
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_icu.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_canon_stdstring.h"
+#include "googleurl/src/url_parse.h"
+#include "googleurl/src/url_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "url/url_canon.h"
-#include "url/url_canon_icu.h"
-#include "url/url_canon_internal.h"
-#include "url/url_canon_stdstring.h"
-#include "url/url_parse.h"
-#include "url/url_test_utils.h"
// Some implementations of base/basictypes.h may define ARRAYSIZE.
// If it's not defined, we define it to the ARRAYSIZE_UNSAFE macro
diff --git a/url/url_common.h b/url/url_common.h
index 5e67a0f..ac045a8 100644
--- a/url/url_common.h
+++ b/url/url_common.h
@@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef URL_URL_COMMON_H_
-#define URL_URL_COMMON_H_
+#ifndef GOOGLEURL_SRC_URL_COMMON_H__
+#define GOOGLEURL_SRC_URL_COMMON_H__
#if !defined(GURL_IMPLEMENTATION)
#define GURL_IMPLEMENTATION 0
@@ -50,4 +50,5 @@
#define GURL_API
#endif
-#endif // URL_URL_COMMON_H_
+#endif // GOOGLEURL_SRC_URL_COMMON_H__
+
diff --git a/url/url_file.h b/url/url_file.h
index e91a73c..c1b8ac9 100644
--- a/url/url_file.h
+++ b/url/url_file.h
@@ -30,10 +30,10 @@
// Provides shared functions used by the internals of the parser and
// canonicalizer for file URLs. Do not use outside of these modules.
-#ifndef URL_URL_FILE_H_
-#define URL_URL_FILE_H_
+#ifndef GOOGLEURL_SRC_URL_FILE_H__
+#define GOOGLEURL_SRC_URL_FILE_H__
-#include "url/url_parse_internal.h"
+#include "googleurl/src/url_parse_internal.h"
namespace url_parse {
@@ -105,4 +105,4 @@ inline bool DoesBeginUNCPath(const CHAR* text,
} // namespace url_parse
-#endif // URL_URL_FILE_H_
+#endif // GOOGLEURL_SRC_URL_FILE_H__
diff --git a/url/url_parse.cc b/url/url_parse.cc
index 6b6af44..b06f4bb 100644
--- a/url/url_parse.cc
+++ b/url/url_parse.cc
@@ -34,14 +34,14 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "url/url_parse.h"
+#include "googleurl/src/url_parse.h"
#include <stdlib.h>
#include "base/logging.h"
-#include "url/url_parse_internal.h"
-#include "url/url_util.h"
-#include "url/url_util_internal.h"
+#include "googleurl/src/url_parse_internal.h"
+#include "googleurl/src/url_util.h"
+#include "googleurl/src/url_util_internal.h"
namespace url_parse {
diff --git a/url/url_parse.h b/url/url_parse.h
index ca01224..3dbe98a 100644
--- a/url/url_parse.h
+++ b/url/url_parse.h
@@ -27,14 +27,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef URL_URL_PARSE_H_
-#define URL_URL_PARSE_H_
+#ifndef GOOGLEURL_SRC_URL_PARSE_H__
+#define GOOGLEURL_SRC_URL_PARSE_H__
#include <string>
#include "base/basictypes.h"
#include "base/string16.h"
-#include "url/url_common.h"
+#include "googleurl/src/url_common.h"
namespace url_parse {
@@ -370,4 +370,4 @@ GURL_API bool ExtractQueryKeyValue(const char16* url,
} // namespace url_parse
-#endif // URL_URL_PARSE_H_
+#endif // GOOGLEURL_SRC_URL_PARSE_H__
diff --git a/url/url_parse_file.cc b/url/url_parse_file.cc
index d944333d..2e8429f 100644
--- a/url/url_parse_file.cc
+++ b/url/url_parse_file.cc
@@ -28,9 +28,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "base/logging.h"
-#include "url/url_file.h"
-#include "url/url_parse.h"
-#include "url/url_parse_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_parse.h"
+#include "googleurl/src/url_parse_internal.h"
// Interesting IE file:isms...
//
diff --git a/url/url_parse_internal.h b/url/url_parse_internal.h
index c3b233f..61bd068 100644
--- a/url/url_parse_internal.h
+++ b/url/url_parse_internal.h
@@ -29,10 +29,10 @@
// Contains common inline helper functions used by the URL parsing routines.
-#ifndef URL_URL_PARSE_INTERNAL_H_
-#define URL_URL_PARSE_INTERNAL_H_
+#ifndef GOOGLEURL_SRC_URL_PARSE_INTERNAL_H__
+#define GOOGLEURL_SRC_URL_PARSE_INTERNAL_H__
-#include "url/url_parse.h"
+#include "googleurl/src/url_parse.h"
namespace url_parse {
@@ -109,4 +109,4 @@ void ParseAfterScheme(const char16* spec,
} // namespace url_parse
-#endif // URL_URL_PARSE_INTERNAL_H_
+#endif // GOOGLEURL_SRC_URL_PARSE_INTERNAL_H__
diff --git a/url/url_parse_unittest.cc b/url/url_parse_unittest.cc
index dc23ef1..8454806 100644
--- a/url/url_parse_unittest.cc
+++ b/url/url_parse_unittest.cc
@@ -30,6 +30,7 @@
#include "url/url_parse.h"
#include "base/basictypes.h"
+#include "googleurl/src/url_parse.h"
#include "testing/gtest/include/gtest/gtest.h"
// Some implementations of base/basictypes.h may define ARRAYSIZE.
diff --git a/url/url_test_utils.h b/url/url_test_utils.h
index 23c7290..6278e3f 100644
--- a/url/url_test_utils.h
+++ b/url/url_test_utils.h
@@ -30,14 +30,14 @@
// Convenience functions for string conversions.
// These are mostly intended for use in unit tests.
-#ifndef URL_URL_TEST_UTILS_H_
-#define URL_URL_TEST_UTILS_H_
+#ifndef GOOGLEURL_SRC_URL_TEST_UTILS_H__
+#define GOOGLEURL_SRC_URL_TEST_UTILS_H__
#include <string>
#include "base/string16.h"
+#include "googleurl/src/url_canon_internal.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "url/url_canon_internal.h"
namespace url_test_utils {
@@ -75,4 +75,4 @@ inline std::string ConvertUTF16ToUTF8(const string16& src) {
} // namespace url_test_utils
-#endif // URL_URL_TEST_UTILS_H_
+#endif // GOOGLEURL_SRC_URL_TEST_UTILS_H__
diff --git a/url/url_util.cc b/url/url_util.cc
index 74186f5..9d621bc2 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -27,16 +27,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "url/url_util.h"
-
#include <string.h>
-
#include <vector>
+#include "googleurl/src/url_util.h"
+
#include "base/logging.h"
-#include "url/url_canon_internal.h"
-#include "url/url_file.h"
-#include "url/url_util_internal.h"
+#include "googleurl/src/url_canon_internal.h"
+#include "googleurl/src/url_file.h"
+#include "googleurl/src/url_util_internal.h"
namespace url_util {
diff --git a/url/url_util.h b/url/url_util.h
index 9911196..9e53d2d 100644
--- a/url/url_util.h
+++ b/url/url_util.h
@@ -27,15 +27,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef URL_URL_UTIL_H_
-#define URL_URL_UTIL_H_
+#ifndef GOOGLEURL_SRC_URL_UTIL_H__
+#define GOOGLEURL_SRC_URL_UTIL_H__
#include <string>
#include "base/string16.h"
-#include "url/url_canon.h"
-#include "url/url_common.h"
-#include "url/url_parse.h"
+#include "googleurl/src/url_common.h"
+#include "googleurl/src/url_parse.h"
+#include "googleurl/src/url_canon.h"
namespace url_util {
@@ -225,4 +225,4 @@ GURL_API void EncodeURIComponent(const char* input, int length,
} // namespace url_util
-#endif // URL_URL_UTIL_H_
+#endif // GOOGLEURL_SRC_URL_UTIL_H__
diff --git a/url/url_util_internal.h b/url/url_util_internal.h
index acc4b2e..1fbb46a 100644
--- a/url/url_util_internal.h
+++ b/url/url_util_internal.h
@@ -27,14 +27,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef URL_URL_UTIL_INTERNAL_H_
-#define URL_URL_UTIL_INTERNAL_H_
+#ifndef GOOGLEURL_SRC_URL_UTIL_INTERNAL_H__
+#define GOOGLEURL_SRC_URL_UTIL_INTERNAL_H__
#include <string>
#include "base/string16.h"
-#include "url/url_common.h"
-#include "url/url_parse.h"
+#include "googleurl/src/url_common.h"
+#include "googleurl/src/url_parse.h"
namespace url_util {
@@ -53,4 +53,4 @@ bool CompareSchemeComponent(const char16* spec,
} // namespace url_util
-#endif // URL_URL_UTIL_INTERNAL_H_
+#endif // GOOGLEURL_SRC_URL_UTIL_INTERNAL_H__
diff --git a/url/url_util_unittest.cc b/url/url_util_unittest.cc
index 6d210fc..c7b39fe 100644
--- a/url/url_util_unittest.cc
+++ b/url/url_util_unittest.cc
@@ -27,12 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include "googleurl/src/url_canon.h"
+#include "googleurl/src/url_canon_stdstring.h"
+#include "googleurl/src/url_parse.h"
+#include "googleurl/src/url_test_utils.h"
+#include "googleurl/src/url_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "url/url_canon.h"
-#include "url/url_canon_stdstring.h"
-#include "url/url_parse.h"
-#include "url/url_test_utils.h"
-#include "url/url_util.h"
TEST(URLUtilTest, FindAndCompareScheme) {
url_parse::Component found_scheme;