OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_password_manager_client.h" | 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 using sessions::SerializedNavigationEntry; | 74 using sessions::SerializedNavigationEntry; |
75 | 75 |
76 // Shorten the name to spare line breaks. The code provides enough context | 76 // Shorten the name to spare line breaks. The code provides enough context |
77 // already. | 77 // already. |
78 typedef autofill::SavePasswordProgressLogger Logger; | 78 typedef autofill::SavePasswordProgressLogger Logger; |
79 | 79 |
80 DEFINE_WEB_CONTENTS_USER_DATA_KEY(ChromePasswordManagerClient); | 80 DEFINE_WEB_CONTENTS_USER_DATA_KEY(ChromePasswordManagerClient); |
81 | 81 |
82 namespace { | 82 namespace { |
83 | 83 |
84 const sync_driver::SyncService* GetSyncService(Profile* profile) { | 84 const syncer::SyncService* GetSyncService(Profile* profile) { |
85 if (ProfileSyncServiceFactory::HasProfileSyncService(profile)) | 85 if (ProfileSyncServiceFactory::HasProfileSyncService(profile)) |
86 return ProfileSyncServiceFactory::GetForProfile(profile); | 86 return ProfileSyncServiceFactory::GetForProfile(profile); |
87 return nullptr; | 87 return nullptr; |
88 } | 88 } |
89 | 89 |
90 const SigninManagerBase* GetSigninManager(Profile* profile) { | 90 const SigninManagerBase* GetSigninManager(Profile* profile) { |
91 return SigninManagerFactory::GetForProfile(profile); | 91 return SigninManagerFactory::GetForProfile(profile); |
92 } | 92 } |
93 | 93 |
94 // This routine is called when PasswordManagerClient is constructed. | 94 // This routine is called when PasswordManagerClient is constructed. |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 ChromePasswordManagerClient::FromWebContents(web_contents); | 638 ChromePasswordManagerClient::FromWebContents(web_contents); |
639 | 639 |
640 // Try to bind to the driver, but if driver is not available for this render | 640 // Try to bind to the driver, but if driver is not available for this render |
641 // frame host, the request will be just dropped. This will cause the message | 641 // frame host, the request will be just dropped. This will cause the message |
642 // pipe to be closed, which will raise a connection error on the peer side. | 642 // pipe to be closed, which will raise a connection error on the peer side. |
643 if (!instance) | 643 if (!instance) |
644 return; | 644 return; |
645 | 645 |
646 instance->credential_manager_impl_.BindRequest(std::move(request)); | 646 instance->credential_manager_impl_.BindRequest(std::move(request)); |
647 } | 647 } |
OLD | NEW |