Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: net/base/registry_controlled_domain.h

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/net_util.cc ('k') | net/base/registry_controlled_domain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/registry_controlled_domain.h
diff --git a/net/base/registry_controlled_domain.h b/net/base/registry_controlled_domain.h
index 2c6edb7649fd84702119022a0523deefed8c7959..1897e8b5fc8bd58c88c4c517445153777471c649 100644
--- a/net/base/registry_controlled_domain.h
+++ b/net/base/registry_controlled_domain.h
@@ -227,7 +227,7 @@ class RegistryControlledDomainService {
// consider the attributes when doing comparisons, so as far as any data
// structures our concerned (ex our set), two DomainEntry's are equal as long
// as their StringPiece (the domain) is equal. This is the behavior we want.
- class DomainEntry : public StringPiece {
+ class DomainEntry : public base::StringPiece {
public:
struct DomainEntryAttributes {
DomainEntryAttributes() : exception(false), wildcard(false) { }
@@ -242,8 +242,9 @@ class RegistryControlledDomainService {
bool wildcard;
};
- DomainEntry() : StringPiece() { }
- DomainEntry(const char* ptr, size_type size) : StringPiece(ptr, size) { }
+ DomainEntry() : base::StringPiece() { }
+ DomainEntry(const char* ptr, size_type size)
+ : base::StringPiece(ptr, size) { }
~DomainEntry() { }
// We override StringPiece's operator < to make it more efficent, since we
@@ -252,7 +253,7 @@ class RegistryControlledDomainService {
bool operator<(const DomainEntry& other) const {
// If we are the same size, call up to StringPiece's real less than.
if (size() == other.size())
- return *static_cast<const StringPiece*>(this) < other;
+ return *static_cast<const base::StringPiece*>(this) < other;
// Consider ourselves less if we are smaller
return size() < other.size();
}
@@ -269,7 +270,7 @@ class RegistryControlledDomainService {
// were populated from an embedded resource, we will reference the embedded
// resource directly. If we were populated through UseDomainData, then our
// StringPiece will reference our local copy in copied_domain_data_.
- void ParseDomainData(const StringPiece& data);
+ void ParseDomainData(const base::StringPiece& data);
// Returns the singleton instance, after attempting to initialize it.
// NOTE that if the effective-TLD data resource can't be found, the instance
@@ -277,7 +278,7 @@ class RegistryControlledDomainService {
static RegistryControlledDomainService* GetInstance();
// Adds one rule, assumed to be valid, to the domain_set_.
- void AddRule(const StringPiece& rule_str);
+ void AddRule(const base::StringPiece& rule_str);
// Internal workings of the static public methods. See above.
static std::string GetDomainAndRegistryImpl(const std::string& host);
« no previous file with comments | « net/base/net_util.cc ('k') | net/base/registry_controlled_domain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698