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

Side by Side Diff: components/autofill/core/browser/webdata/autofill_profile_data_type_controller.cc

Issue 2769113002: [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (Closed)
Patch Set: Rebase and removing dependent patch set. Created 3 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h" 5 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 10 matching lines...) Expand all
21 AutofillProfileDataTypeController::AutofillProfileDataTypeController( 21 AutofillProfileDataTypeController::AutofillProfileDataTypeController(
22 scoped_refptr<base::SingleThreadTaskRunner> db_thread, 22 scoped_refptr<base::SingleThreadTaskRunner> db_thread,
23 const base::Closure& dump_stack, 23 const base::Closure& dump_stack,
24 syncer::SyncClient* sync_client, 24 syncer::SyncClient* sync_client,
25 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service) 25 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service)
26 : AsyncDirectoryTypeController(syncer::AUTOFILL_PROFILE, 26 : AsyncDirectoryTypeController(syncer::AUTOFILL_PROFILE,
27 dump_stack, 27 dump_stack,
28 sync_client, 28 sync_client,
29 syncer::GROUP_DB, 29 syncer::GROUP_DB,
30 std::move(db_thread)), 30 std::move(db_thread)),
31 sync_client_(sync_client),
32 web_data_service_(web_data_service), 31 web_data_service_(web_data_service),
33 callback_registered_(false) {} 32 callback_registered_(false) {}
34 33
35 void AutofillProfileDataTypeController::WebDatabaseLoaded() { 34 void AutofillProfileDataTypeController::WebDatabaseLoaded() {
36 DCHECK(CalledOnValidThread()); 35 DCHECK(CalledOnValidThread());
37 OnModelLoaded(); 36 OnModelLoaded();
38 } 37 }
39 38
40 void AutofillProfileDataTypeController::OnPersonalDataChanged() { 39 void AutofillProfileDataTypeController::OnPersonalDataChanged() {
41 DCHECK(CalledOnValidThread()); 40 DCHECK(CalledOnValidThread());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 85
87 return false; 86 return false;
88 } 87 }
89 88
90 void AutofillProfileDataTypeController::StopModels() { 89 void AutofillProfileDataTypeController::StopModels() {
91 DCHECK(CalledOnValidThread()); 90 DCHECK(CalledOnValidThread());
92 sync_client_->GetPersonalDataManager()->RemoveObserver(this); 91 sync_client_->GetPersonalDataManager()->RemoveObserver(this);
93 } 92 }
94 93
95 } // namespace browser_sync 94 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698