OLD | NEW |
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 "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h" | 5 #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // static | 44 // static |
45 IOSChromePasswordStoreFactory* IOSChromePasswordStoreFactory::GetInstance() { | 45 IOSChromePasswordStoreFactory* IOSChromePasswordStoreFactory::GetInstance() { |
46 return base::Singleton<IOSChromePasswordStoreFactory>::get(); | 46 return base::Singleton<IOSChromePasswordStoreFactory>::get(); |
47 } | 47 } |
48 | 48 |
49 // static | 49 // static |
50 void IOSChromePasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged( | 50 void IOSChromePasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged( |
51 ios::ChromeBrowserState* browser_state) { | 51 ios::ChromeBrowserState* browser_state) { |
52 scoped_refptr<password_manager::PasswordStore> password_store = | 52 scoped_refptr<password_manager::PasswordStore> password_store = |
53 GetForBrowserState(browser_state, ServiceAccessType::EXPLICIT_ACCESS); | 53 GetForBrowserState(browser_state, ServiceAccessType::EXPLICIT_ACCESS); |
54 sync_driver::SyncService* sync_service = | 54 syncer::SyncService* sync_service = |
55 IOSChromeProfileSyncServiceFactory::GetForBrowserStateIfExists( | 55 IOSChromeProfileSyncServiceFactory::GetForBrowserStateIfExists( |
56 browser_state); | 56 browser_state); |
57 net::URLRequestContextGetter* request_context_getter = | 57 net::URLRequestContextGetter* request_context_getter = |
58 browser_state->GetRequestContext(); | 58 browser_state->GetRequestContext(); |
59 password_manager::ToggleAffiliationBasedMatchingBasedOnPasswordSyncedState( | 59 password_manager::ToggleAffiliationBasedMatchingBasedOnPasswordSyncedState( |
60 password_store.get(), sync_service, request_context_getter, | 60 password_store.get(), sync_service, request_context_getter, |
61 browser_state->GetStatePath(), | 61 browser_state->GetStatePath(), |
62 web::WebThread::GetTaskRunnerForThread(web::WebThread::DB)); | 62 web::WebThread::GetTaskRunnerForThread(web::WebThread::DB)); |
63 } | 63 } |
64 | 64 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 | 97 |
98 web::BrowserState* IOSChromePasswordStoreFactory::GetBrowserStateToUse( | 98 web::BrowserState* IOSChromePasswordStoreFactory::GetBrowserStateToUse( |
99 web::BrowserState* context) const { | 99 web::BrowserState* context) const { |
100 return GetBrowserStateRedirectedInIncognito(context); | 100 return GetBrowserStateRedirectedInIncognito(context); |
101 } | 101 } |
102 | 102 |
103 bool IOSChromePasswordStoreFactory::ServiceIsNULLWhileTesting() const { | 103 bool IOSChromePasswordStoreFactory::ServiceIsNULLWhileTesting() const { |
104 return true; | 104 return true; |
105 } | 105 } |
OLD | NEW |