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

Side by Side 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, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/net/cookie_store_map_impl.h"
6
7 #include "base/logging.h"
8 #include "net/cookies/cookie_store.h"
9
10 namespace content {
11
12 CookieStoreMapImpl::CookieStoreMapImpl() {
13 }
14
15 CookieStoreMapImpl::~CookieStoreMapImpl() {
16 }
17
18 net::CookieStore* CookieStoreMapImpl::GetForScheme(
19 const std::string& scheme) const {
20 MapType::const_iterator it = scheme_map_.find(scheme);
21 if (it == scheme_map_.end())
22 return NULL;
23 return it->second;
24 }
25
26 void CookieStoreMapImpl::SetForScheme(const std::string& scheme,
27 net::CookieStore* cookie_store) {
28 DCHECK(scheme_map_.find(scheme) == scheme_map_.end());
29 DCHECK(cookie_store);
30 scheme_map_[scheme] = cookie_store;
31 }
32
33 CookieStoreMap* CookieStoreMapImpl::Clone() const {
34 CookieStoreMapImpl* cloned_map = new CookieStoreMapImpl();
35 cloned_map->scheme_map_ = scheme_map_;
36 return cloned_map;
37 }
38
39 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698