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

Side by Side Diff: chrome/browser/password_manager/password_store_proxy_mac.cc

Issue 2846023003: Creating a preference for storing a sync password hash. (Closed)
Patch Set: Reviewer's comments addressed Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/password_manager/password_store_proxy_mac.h" 5 #include "chrome/browser/password_manager/password_store_proxy_mac.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 18 matching lines...) Expand all
29 prefs); 29 prefs);
30 // The login database will be set later after initialization. 30 // The login database will be set later after initialization.
31 password_store_simple_ = 31 password_store_simple_ =
32 new SimplePasswordStoreMac(main_thread_runner, nullptr, nullptr); 32 new SimplePasswordStoreMac(main_thread_runner, nullptr, nullptr);
33 } 33 }
34 34
35 PasswordStoreProxyMac::~PasswordStoreProxyMac() { 35 PasswordStoreProxyMac::~PasswordStoreProxyMac() {
36 } 36 }
37 37
38 bool PasswordStoreProxyMac::Init( 38 bool PasswordStoreProxyMac::Init(
39 const syncer::SyncableService::StartSyncFlare& flare) { 39 const syncer::SyncableService::StartSyncFlare& flare,
40 PrefService* prefs) {
40 // Set up a background thread. 41 // Set up a background thread.
41 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 42 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
42 thread_.reset(new base::Thread("Chrome_PasswordStore_Thread")); 43 thread_.reset(new base::Thread("Chrome_PasswordStore_Thread"));
43 44
44 if (!thread_->Start()) { 45 if (!thread_->Start()) {
45 thread_.reset(); 46 thread_.reset();
46 return false; 47 return false;
47 } 48 }
48 49
49 if (!ScheduleTask(base::Bind( 50 if (!ScheduleTask(base::Bind(
50 &PasswordStoreProxyMac::InitOnBackgroundThread, this, 51 &PasswordStoreProxyMac::InitOnBackgroundThread, this,
51 static_cast<MigrationStatus>(migration_status_.GetValue())))) 52 static_cast<MigrationStatus>(migration_status_.GetValue()))))
52 return false; 53 return false;
53 54
54 return password_manager::PasswordStore::Init(flare); 55 return password_manager::PasswordStore::Init(flare, prefs);
55 } 56 }
56 57
57 void PasswordStoreProxyMac::ShutdownOnUIThread() { 58 void PasswordStoreProxyMac::ShutdownOnUIThread() {
58 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 59 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
59 PasswordStore::ShutdownOnUIThread(); 60 PasswordStore::ShutdownOnUIThread();
60 thread_->Stop(); 61 thread_->Stop();
61 62
62 // Execute the task which are still pending. 63 // Execute the task which are still pending.
63 FlushPendingTasks(); 64 FlushPendingTasks();
64 65
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 210
210 std::vector<password_manager::InteractionsStats> 211 std::vector<password_manager::InteractionsStats>
211 PasswordStoreProxyMac::GetAllSiteStatsImpl() { 212 PasswordStoreProxyMac::GetAllSiteStatsImpl() {
212 return GetBackend()->GetAllSiteStatsImpl(); 213 return GetBackend()->GetAllSiteStatsImpl();
213 } 214 }
214 215
215 std::vector<password_manager::InteractionsStats> 216 std::vector<password_manager::InteractionsStats>
216 PasswordStoreProxyMac::GetSiteStatsImpl(const GURL& origin_domain) { 217 PasswordStoreProxyMac::GetSiteStatsImpl(const GURL& origin_domain) {
217 return GetBackend()->GetSiteStatsImpl(origin_domain); 218 return GetBackend()->GetSiteStatsImpl(origin_domain);
218 } 219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698