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

Unified Diff: content/browser/net/cookie_store_map_impl.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: most unittests pass Created 7 years, 5 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
Index: content/browser/net/cookie_store_map_impl.cc
diff --git a/content/browser/net/cookie_store_map_impl.cc b/content/browser/net/cookie_store_map_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e8d4af18163d6b9aebbc3da3364840bfe6c503b7
--- /dev/null
+++ b/content/browser/net/cookie_store_map_impl.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 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 "content/browser/net/cookie_store_map_impl.h"
+
+#include "base/logging.h"
+#include "net/cookies/cookie_store.h"
+
+namespace content {
+
+CookieStoreMapImpl::CookieStoreMapImpl() {
+}
+
+CookieStoreMapImpl::~CookieStoreMapImpl() {
+}
+
+net::CookieStore* CookieStoreMapImpl::GetForScheme(
+ const std::string& scheme) const {
+ MapType::const_iterator it = scheme_map_.find(scheme);
+ if (it == scheme_map_.end())
+ return NULL;
+ return it->second;
+}
+
+void CookieStoreMapImpl::SetForScheme(const std::string& scheme,
+ net::CookieStore* cookie_store) {
+ DCHECK(scheme_map_.find(scheme) == scheme_map_.end());
+ DCHECK(cookie_store);
+ scheme_map_[scheme] = cookie_store;
+}
+
+CookieStoreMap* CookieStoreMapImpl::Clone() const {
+ CookieStoreMapImpl* cloned_map = new CookieStoreMapImpl();
+ cloned_map->scheme_map_ = scheme_map_;
+ return cloned_map;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698