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

Side by Side Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change Cookie Override API to not expose the CookieStoreMap. 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/net/aw_url_request_context_getter.h" 5 #include "android_webview/browser/net/aw_url_request_context_getter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_content_browser_client.h" 10 #include "android_webview/browser/aw_content_browser_client.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 BrowserThread::SetDelegate(BrowserThread::IO, this); 47 BrowserThread::SetDelegate(BrowserThread::IO, this);
48 } 48 }
49 49
50 AwURLRequestContextGetter::~AwURLRequestContextGetter() { 50 AwURLRequestContextGetter::~AwURLRequestContextGetter() {
51 BrowserThread::SetDelegate(BrowserThread::IO, NULL); 51 BrowserThread::SetDelegate(BrowserThread::IO, NULL);
52 } 52 }
53 53
54 void AwURLRequestContextGetter::Init() { 54 void AwURLRequestContextGetter::Init() {
55 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 55 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
56 56
57 cookie_store_ = content::CreatePersistentCookieStore( 57 cookie_store_ = content::CreateCookieStore(
58 browser_context_->GetPath().Append(FILE_PATH_LITERAL("Cookies")), 58 browser_context_->GetCookieStoreConfig());
59 true,
60 NULL,
61 NULL);
62 cookie_store_->GetCookieMonster()->SetPersistSessionCookies(true);
63 59
64 // The CookieMonster must be passed here so it happens synchronously to 60 // The CookieMonster must be passed here so it happens synchronously to
65 // the main thread initialization (to avoid race condition in another 61 // the main thread initialization (to avoid race condition in another
66 // thread trying to access the CookieManager API). 62 // thread trying to access the CookieManager API).
67 DidCreateCookieMonster(cookie_store_->GetCookieMonster()); 63 DidCreateCookieMonster(cookie_store_->GetCookieMonster());
68 } 64 }
69 65
70 void AwURLRequestContextGetter::InitAsync() { 66 void AwURLRequestContextGetter::InitAsync() {
71 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
72 68
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 AwURLRequestContextGetter::GetNetworkTaskRunner() const { 185 AwURLRequestContextGetter::GetNetworkTaskRunner() const {
190 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 186 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
191 } 187 }
192 188
193 void AwURLRequestContextGetter::SetProtocolHandlers( 189 void AwURLRequestContextGetter::SetProtocolHandlers(
194 content::ProtocolHandlerMap* protocol_handlers) { 190 content::ProtocolHandlerMap* protocol_handlers) {
195 std::swap(protocol_handlers_, *protocol_handlers); 191 std::swap(protocol_handlers_, *protocol_handlers);
196 } 192 }
197 193
198 } // namespace android_webview 194 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | android_webview/native/aw_quota_manager_bridge_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698