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

Unified Diff: url/scheme_set.cc

Issue 2492753002: [WIP] [url_utils] Implement a contiguous SchemeSet to replace vector<SchemeWithType>
Patch Set: separate SchemeSet for blink migration Created 4 years, 1 month 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 | « url/scheme_set.h ('k') | url/url_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/scheme_set.cc
diff --git a/url/scheme_set.cc b/url/scheme_set.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b0a8b2425d14ee658baa3df30129b0f1449dfa3d
--- /dev/null
+++ b/url/scheme_set.cc
@@ -0,0 +1,19 @@
+// Copyright 2016 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/scheme_set.h"
+
+namespace url {
+
+SchemeSet::SchemeSet() {}
+SchemeSet::~SchemeSet() {}
+
+void SchemeSet::add(const char* scheme) {
+ size_t len = backing_string_.size();
+ backing_string_.append(scheme);
+ size_t delta = backing_string_.size() - len;
+ pieces_.emplace_back(len, delta);
+}
+
+} // namespace url
« no previous file with comments | « url/scheme_set.h ('k') | url/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698