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

Unified Diff: net/base/registry_controlled_domain.cc

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/registry_controlled_domain.h ('k') | net/http/http_chunked_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/registry_controlled_domain.cc
diff --git a/net/base/registry_controlled_domain.cc b/net/base/registry_controlled_domain.cc
index 2bcfba589a36c09fb1da5ea05ab4f627ef3c4d5d..40dea62e580d7be2c65287ec5c2a50a5b77a33c2 100644
--- a/net/base/registry_controlled_domain.cc
+++ b/net/base/registry_controlled_domain.cc
@@ -276,21 +276,23 @@ void RegistryControlledDomainService::Init() {
ParseDomainData(kDomainData);
}
-void RegistryControlledDomainService::ParseDomainData(const StringPiece& data) {
+void RegistryControlledDomainService::ParseDomainData(
+ const base::StringPiece& data) {
domain_set_.clear();
size_t line_end = 0;
size_t line_start = 0;
while (line_start < data.size()) {
line_end = data.find('\n', line_start);
- if (line_end == StringPiece::npos)
+ if (line_end == base::StringPiece::npos)
line_end = data.size();
- AddRule(StringPiece(data.data() + line_start, line_end - line_start));
+ AddRule(base::StringPiece(data.data() + line_start, line_end - line_start));
line_start = line_end + 1;
}
}
-void RegistryControlledDomainService::AddRule(const StringPiece& rule_str) {
+void RegistryControlledDomainService::AddRule(
+ const base::StringPiece& rule_str) {
DomainEntry rule(rule_str.data(), rule_str.size());
// Valid rules may be either wild or exceptions, but not both.
« no previous file with comments | « net/base/registry_controlled_domain.h ('k') | net/http/http_chunked_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698