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_quota_manager_bridge.h" | 8 #include "android_webview/browser/aw_quota_manager_bridge.h" |
8 #include "android_webview/browser/jni_dependency_factory.h" | 9 #include "android_webview/browser/jni_dependency_factory.h" |
9 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 10 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
10 #include "components/visitedlink/browser/visitedlink_master.h" | 11 #include "components/visitedlink/browser/visitedlink_master.h" |
11 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/resource_context.h" | 13 #include "content/public/browser/resource_context.h" |
13 #include "content/public/browser/storage_partition.h" | 14 #include "content/public/browser/storage_partition.h" |
14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
15 #include "net/url_request/url_request_context.h" | 16 #include "net/url_request/url_request_context.h" |
16 | 17 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 93 } |
93 | 94 |
94 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() { | 95 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() { |
95 if (!quota_manager_bridge_) { | 96 if (!quota_manager_bridge_) { |
96 quota_manager_bridge_.reset( | 97 quota_manager_bridge_.reset( |
97 native_factory_->CreateAwQuotaManagerBridge(this)); | 98 native_factory_->CreateAwQuotaManagerBridge(this)); |
98 } | 99 } |
99 return quota_manager_bridge_.get(); | 100 return quota_manager_bridge_.get(); |
100 } | 101 } |
101 | 102 |
| 103 // TODO(sgurun) we may need to do this at the constructor, depending on |
| 104 // how the rest of the implementation to enable autocomplete unwraps itself. |
| 105 AwFormDatabaseService* AwBrowserContext::GetFormDatabaseService() { |
| 106 if (!form_database_service_) { |
| 107 form_database_service_.reset( |
| 108 new AwFormDatabaseService(context_storage_path_)); |
| 109 } |
| 110 return form_database_service_.get(); |
| 111 } |
| 112 |
102 base::FilePath AwBrowserContext::GetPath() { | 113 base::FilePath AwBrowserContext::GetPath() { |
103 return context_storage_path_; | 114 return context_storage_path_; |
104 } | 115 } |
105 | 116 |
106 bool AwBrowserContext::IsOffTheRecord() const { | 117 bool AwBrowserContext::IsOffTheRecord() const { |
107 // Android WebView does not support off the record profile yet. | 118 // Android WebView does not support off the record profile yet. |
108 return false; | 119 return false; |
109 } | 120 } |
110 | 121 |
111 net::URLRequestContextGetter* AwBrowserContext::GetRequestContext() { | 122 net::URLRequestContextGetter* AwBrowserContext::GetRequestContext() { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 183 |
173 void AwBrowserContext::RebuildTable( | 184 void AwBrowserContext::RebuildTable( |
174 const scoped_refptr<URLEnumerator>& enumerator) { | 185 const scoped_refptr<URLEnumerator>& enumerator) { |
175 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 186 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
176 // can change in the lifetime of this WebView and may not yet be set here. | 187 // can change in the lifetime of this WebView and may not yet be set here. |
177 // Therefore this initialization path is not used. | 188 // Therefore this initialization path is not used. |
178 enumerator->OnComplete(true); | 189 enumerator->OnComplete(true); |
179 } | 190 } |
180 | 191 |
181 } // namespace android_webview | 192 } // namespace android_webview |
OLD | NEW |