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

Side by Side Diff: android_webview/browser/aw_browser_context.cc

Issue 14503010: Implement WebViewDatabase's hasFormData API for chromium based webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address new code review Created 7 years, 7 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
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/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
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
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
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | android_webview/browser/aw_form_database_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698