summaryrefslogtreecommitdiffstats
path: root/googleurl
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /googleurl
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'googleurl')
-rw-r--r--googleurl/src/gurl.cc7
-rw-r--r--googleurl/src/gurl.h2
-rw-r--r--googleurl/src/url_parse.cc3
-rw-r--r--googleurl/src/url_parse.h2
4 files changed, 13 insertions, 1 deletions
diff --git a/googleurl/src/gurl.cc b/googleurl/src/gurl.cc
index a0bfd26..3a1f2b9 100644
--- a/googleurl/src/gurl.cc
+++ b/googleurl/src/gurl.cc
@@ -148,6 +148,13 @@ GURL::GURL(const char* canonical_spec, size_t canonical_spec_len,
#endif
}
+GURL& GURL::operator=(const GURL& other) {
+ spec_ = other.spec_;
+ is_valid_ = other.is_valid_;
+ parsed_ = other.parsed_;
+ return *this;
+}
+
const std::string& GURL::spec() const {
if (is_valid_ || spec_.empty())
return spec_;
diff --git a/googleurl/src/gurl.h b/googleurl/src/gurl.h
index ba97191..4088f27 100644
--- a/googleurl/src/gurl.h
+++ b/googleurl/src/gurl.h
@@ -69,6 +69,8 @@ class GURL {
GURL_API GURL(const char* canonical_spec, size_t canonical_spec_len,
const url_parse::Parsed& parsed, bool is_valid);
+ GURL_API GURL& operator=(const GURL& other);
+
// Returns true when this object represents a valid parsed URL. When not
// valid, other functions will still succeed, but you will not get canonical
// data out in the format you may be expecting. Instead, we keep something
diff --git a/googleurl/src/url_parse.cc b/googleurl/src/url_parse.cc
index fa31210..28e7a0b 100644
--- a/googleurl/src/url_parse.cc
+++ b/googleurl/src/url_parse.cc
@@ -565,6 +565,9 @@ bool DoExtractQueryKeyValue(const CHAR* spec,
} // namespace
+Parsed::Parsed() {
+}
+
int Parsed::Length() const {
if (ref.is_valid())
return ref.end();
diff --git a/googleurl/src/url_parse.h b/googleurl/src/url_parse.h
index 134b445..64bb223 100644
--- a/googleurl/src/url_parse.h
+++ b/googleurl/src/url_parse.h
@@ -120,7 +120,7 @@ struct Parsed {
};
// The default constructor is sufficient for the components.
- Parsed() {}
+ GURL_API Parsed();
// Returns the length of the URL (the end of the last component).
//