OLD | NEW |
---|---|
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/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
6 | 6 |
7 #include "android_webview/browser/aw_form_database_service.h" | 7 #include "android_webview/browser/aw_form_database_service.h" |
8 #include "android_webview/browser/aw_pref_store.h" | 8 #include "android_webview/browser/aw_pref_store.h" |
9 #include "android_webview/browser/aw_quota_manager_bridge.h" | 9 #include "android_webview/browser/aw_quota_manager_bridge.h" |
10 #include "android_webview/browser/jni_dependency_factory.h" | 10 #include "android_webview/browser/jni_dependency_factory.h" |
11 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 11 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
12 #include "android_webview/browser/net/init_native_callback.h" | 12 #include "android_webview/browser/net/init_native_callback.h" |
13 #include "base/android/path_utils.h" | 13 #include "base/android/path_utils.h" |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/prefs/pref_registry_simple.h" | 16 #include "base/prefs/pref_registry_simple.h" |
17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
18 #include "base/prefs/pref_service_builder.h" | 18 #include "base/prefs/pref_service_builder.h" |
19 #include "base/sequenced_task_runner.h" | 19 #include "base/sequenced_task_runner.h" |
20 #include "base/threading/sequenced_worker_pool.h" | 20 #include "base/threading/sequenced_worker_pool.h" |
21 #include "components/autofill/core/common/autofill_pref_names.h" | 21 #include "components/autofill/core/common/autofill_pref_names.h" |
22 #include "components/user_prefs/user_prefs.h" | 22 #include "components/user_prefs/user_prefs.h" |
23 #include "components/visitedlink/browser/visitedlink_master.h" | 23 #include "components/visitedlink/browser/visitedlink_master.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "content/public/browser/cookie_crypto_delegate.h" | |
erikwright (departed)
2013/10/22 23:58:14
use forward decl instead.
bcwhite
2013/10/23 19:36:23
Done.
erikwright (departed)
2013/10/24 19:27:47
Sorry, I should have realized that you needed a fu
| |
25 #include "content/public/browser/cookie_store_factory.h" | 26 #include "content/public/browser/cookie_store_factory.h" |
26 #include "content/public/browser/resource_context.h" | 27 #include "content/public/browser/resource_context.h" |
27 #include "content/public/browser/storage_partition.h" | 28 #include "content/public/browser/storage_partition.h" |
28 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
29 #include "net/url_request/url_request_context.h" | 30 #include "net/url_request/url_request_context.h" |
30 | 31 |
31 using base::FilePath; | 32 using base::FilePath; |
32 using content::BrowserThread; | 33 using content::BrowserThread; |
33 | 34 |
34 namespace android_webview { | 35 namespace android_webview { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 | 137 |
137 background_task_runner->PostTask( | 138 background_task_runner->PostTask( |
138 FROM_HERE, | 139 FROM_HERE, |
139 base::Bind(ImportLegacyCookieStore, cookie_store_path)); | 140 base::Bind(ImportLegacyCookieStore, cookie_store_path)); |
140 | 141 |
141 cookie_store_ = content::CreatePersistentCookieStore( | 142 cookie_store_ = content::CreatePersistentCookieStore( |
142 cookie_store_path, | 143 cookie_store_path, |
143 true, | 144 true, |
144 NULL, | 145 NULL, |
145 NULL, | 146 NULL, |
146 background_task_runner); | 147 background_task_runner, |
148 scoped_ptr<content::CookieCryptoDelegate>()); | |
147 | 149 |
148 cookie_store_->GetCookieMonster()->SetPersistSessionCookies(true); | 150 cookie_store_->GetCookieMonster()->SetPersistSessionCookies(true); |
149 url_request_context_getter_ = | 151 url_request_context_getter_ = |
150 new AwURLRequestContextGetter(GetPath(), cookie_store_.get()); | 152 new AwURLRequestContextGetter(GetPath(), cookie_store_.get()); |
151 | 153 |
152 DidCreateCookieMonster(cookie_store_->GetCookieMonster()); | 154 DidCreateCookieMonster(cookie_store_->GetCookieMonster()); |
153 | 155 |
154 visitedlink_master_.reset( | 156 visitedlink_master_.reset( |
155 new visitedlink::VisitedLinkMaster(this, this, false)); | 157 new visitedlink::VisitedLinkMaster(this, this, false)); |
156 visitedlink_master_->Init(); | 158 visitedlink_master_->Init(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 | 298 |
297 void AwBrowserContext::RebuildTable( | 299 void AwBrowserContext::RebuildTable( |
298 const scoped_refptr<URLEnumerator>& enumerator) { | 300 const scoped_refptr<URLEnumerator>& enumerator) { |
299 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 301 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
300 // can change in the lifetime of this WebView and may not yet be set here. | 302 // can change in the lifetime of this WebView and may not yet be set here. |
301 // Therefore this initialization path is not used. | 303 // Therefore this initialization path is not used. |
302 enumerator->OnComplete(true); | 304 enumerator->OnComplete(true); |
303 } | 305 } |
304 | 306 |
305 } // namespace android_webview | 307 } // namespace android_webview |
OLD | NEW |