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_store_factory.h" | 25 #include "content/public/browser/cookie_store_factory.h" |
26 #include "content/public/browser/resource_context.h" | 26 #include "content/public/browser/resource_context.h" |
27 #include "content/public/browser/storage_partition.h" | 27 #include "content/public/browser/storage_partition.h" |
28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 #include "net/ssl/client_cert_store.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 { |
35 | 36 |
36 namespace { | 37 namespace { |
37 | 38 |
38 // Shows notifications which correspond to PersistentPrefStore's reading errors. | 39 // Shows notifications which correspond to PersistentPrefStore's reading errors. |
(...skipping 16 matching lines...) Expand all Loading... |
55 virtual net::URLRequestContext* GetRequestContext() OVERRIDE { | 56 virtual net::URLRequestContext* GetRequestContext() OVERRIDE { |
56 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 57 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
57 return getter_->GetURLRequestContext(); | 58 return getter_->GetURLRequestContext(); |
58 } | 59 } |
59 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE { | 60 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE { |
60 return false; | 61 return false; |
61 } | 62 } |
62 virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE { | 63 virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE { |
63 return false; | 64 return false; |
64 } | 65 } |
| 66 virtual scoped_ptr<net::ClientCertStore> GetClientCertStore() OVERRIDE { |
| 67 return scoped_ptr<net::ClientCertStore>(); |
| 68 } |
65 | 69 |
66 private: | 70 private: |
67 net::URLRequestContextGetter* getter_; | 71 net::URLRequestContextGetter* getter_; |
68 | 72 |
69 DISALLOW_COPY_AND_ASSIGN(AwResourceContext); | 73 DISALLOW_COPY_AND_ASSIGN(AwResourceContext); |
70 }; | 74 }; |
71 | 75 |
72 AwBrowserContext* g_browser_context = NULL; | 76 AwBrowserContext* g_browser_context = NULL; |
73 | 77 |
74 void ImportLegacyCookieStore(const FilePath& cookie_store_path) { | 78 void ImportLegacyCookieStore(const FilePath& cookie_store_path) { |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 300 |
297 void AwBrowserContext::RebuildTable( | 301 void AwBrowserContext::RebuildTable( |
298 const scoped_refptr<URLEnumerator>& enumerator) { | 302 const scoped_refptr<URLEnumerator>& enumerator) { |
299 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 303 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
300 // can change in the lifetime of this WebView and may not yet be set here. | 304 // can change in the lifetime of this WebView and may not yet be set here. |
301 // Therefore this initialization path is not used. | 305 // Therefore this initialization path is not used. |
302 enumerator->OnComplete(true); | 306 enumerator->OnComplete(true); |
303 } | 307 } |
304 | 308 |
305 } // namespace android_webview | 309 } // namespace android_webview |
OLD | NEW |