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

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

Issue 16174013: Remove dependency of WebData on content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/oauth_login_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_form_database_service.h" 5 #include "android_webview/browser/aw_form_database_service.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "components/autofill/browser/webdata/autofill_table.h" 7 #include "components/autofill/browser/webdata/autofill_table.h"
8 #include "components/webdata/common/webdata_constants.h" 8 #include "components/webdata/common/webdata_constants.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "ui/base/l10n/l10n_util_android.h" 10 #include "ui/base/l10n/l10n_util_android.h"
(...skipping 11 matching lines...) Expand all
22 } // namespace 22 } // namespace
23 23
24 namespace android_webview { 24 namespace android_webview {
25 25
26 AwFormDatabaseService::AwFormDatabaseService(const base::FilePath path) 26 AwFormDatabaseService::AwFormDatabaseService(const base::FilePath path)
27 : pending_query_handle_(0), 27 : pending_query_handle_(0),
28 has_form_data_(false), 28 has_form_data_(false),
29 completion_(false, false) { 29 completion_(false, false) {
30 30
31 web_database_ = new WebDatabaseService(path.Append(kWebDataFilename), 31 web_database_ = new WebDatabaseService(path.Append(kWebDataFilename),
32 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)); 32 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
33 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB));
33 web_database_->AddTable( 34 web_database_->AddTable(
34 scoped_ptr<WebDatabaseTable>(new autofill::AutofillTable( 35 scoped_ptr<WebDatabaseTable>(new autofill::AutofillTable(
35 l10n_util::GetDefaultLocale()))); 36 l10n_util::GetDefaultLocale())));
36 web_database_->LoadDatabase(); 37 web_database_->LoadDatabase();
37 38
38 autofill_data_ = new autofill::AutofillWebDataService( 39 autofill_data_ = new autofill::AutofillWebDataService(
39 web_database_, base::Bind(&DatabaseErrorCallback)); 40 web_database_, base::Bind(&DatabaseErrorCallback));
40 autofill_data_->Init(); 41 autofill_data_->Init();
41 } 42 }
42 43
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (result) { 98 if (result) {
98 DCHECK_EQ(AUTOFILL_VALUE_RESULT, result->GetType()); 99 DCHECK_EQ(AUTOFILL_VALUE_RESULT, result->GetType());
99 const WDResult<bool>* autofill_result = 100 const WDResult<bool>* autofill_result =
100 static_cast<const WDResult<bool>*>(result); 101 static_cast<const WDResult<bool>*>(result);
101 has_form_data_ = autofill_result->GetValue(); 102 has_form_data_ = autofill_result->GetValue();
102 } 103 }
103 completion_.Signal(); 104 completion_.Signal();
104 } 105 }
105 106
106 } // namespace android_webview 107 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/oauth_login_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698