| 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 "components/password_manager/content/browser/credential_manager_impl.h" | 5 #include "components/password_manager/content/browser/credential_manager_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "components/password_manager/core/browser/stub_password_manager_client.
h" | 27 #include "components/password_manager/core/browser/stub_password_manager_client.
h" |
| 28 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" | 28 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" |
| 29 #include "components/password_manager/core/browser/test_password_store.h" | 29 #include "components/password_manager/core/browser/test_password_store.h" |
| 30 #include "components/password_manager/core/common/credential_manager_types.h" | 30 #include "components/password_manager/core/common/credential_manager_types.h" |
| 31 #include "components/password_manager/core/common/password_manager_pref_names.h" | 31 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 32 #include "components/prefs/pref_registry_simple.h" | 32 #include "components/prefs/pref_registry_simple.h" |
| 33 #include "components/prefs/testing_pref_service.h" | 33 #include "components/prefs/testing_pref_service.h" |
| 34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "content/public/test/mock_render_process_host.h" | 35 #include "content/public/test/mock_render_process_host.h" |
| 36 #include "content/public/test/test_renderer_host.h" | 36 #include "content/public/test/test_renderer_host.h" |
| 37 #include "mojo/common/url_type_converters.h" | |
| 38 #include "testing/gmock/include/gmock/gmock.h" | 37 #include "testing/gmock/include/gmock/gmock.h" |
| 39 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
| 40 | 39 |
| 41 using content::BrowserContext; | 40 using content::BrowserContext; |
| 42 using content::WebContents; | 41 using content::WebContents; |
| 43 | 42 |
| 44 using testing::_; | 43 using testing::_; |
| 45 | 44 |
| 46 namespace password_manager { | 45 namespace password_manager { |
| 47 | 46 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 348 |
| 350 void CallRequireUserMediation( | 349 void CallRequireUserMediation( |
| 351 const CredentialManagerImpl::RequireUserMediationCallback& callback) { | 350 const CredentialManagerImpl::RequireUserMediationCallback& callback) { |
| 352 cm_service_impl_->RequireUserMediation(callback); | 351 cm_service_impl_->RequireUserMediation(callback); |
| 353 } | 352 } |
| 354 | 353 |
| 355 void CallGet(bool zero_click_only, | 354 void CallGet(bool zero_click_only, |
| 356 bool include_passwords, | 355 bool include_passwords, |
| 357 const std::vector<GURL>& federations, | 356 const std::vector<GURL>& federations, |
| 358 const CredentialManagerImpl::GetCallback& callback) { | 357 const CredentialManagerImpl::GetCallback& callback) { |
| 359 cm_service_impl_->Get(zero_click_only, include_passwords, | 358 cm_service_impl_->Get(zero_click_only, include_passwords, federations, |
| 360 mojo::Array<mojo::String>::From(federations), | |
| 361 callback); | 359 callback); |
| 362 } | 360 } |
| 363 | 361 |
| 364 protected: | 362 protected: |
| 365 autofill::PasswordForm form_; | 363 autofill::PasswordForm form_; |
| 366 autofill::PasswordForm affiliated_form1_; | 364 autofill::PasswordForm affiliated_form1_; |
| 367 autofill::PasswordForm affiliated_form2_; | 365 autofill::PasswordForm affiliated_form2_; |
| 368 autofill::PasswordForm origin_path_form_; | 366 autofill::PasswordForm origin_path_form_; |
| 369 autofill::PasswordForm subdomain_form_; | 367 autofill::PasswordForm subdomain_form_; |
| 370 autofill::PasswordForm cross_origin_form_; | 368 autofill::PasswordForm cross_origin_form_; |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); | 1300 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); |
| 1303 CallStore(info, base::Bind(&RespondCallback, &called)); | 1301 CallStore(info, base::Bind(&RespondCallback, &called)); |
| 1304 // Allow the PasswordFormManager to talk to the password store | 1302 // Allow the PasswordFormManager to talk to the password store |
| 1305 RunAllPendingTasks(); | 1303 RunAllPendingTasks(); |
| 1306 | 1304 |
| 1307 ASSERT_TRUE(client_->pending_manager()); | 1305 ASSERT_TRUE(client_->pending_manager()); |
| 1308 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); | 1306 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); |
| 1309 } | 1307 } |
| 1310 | 1308 |
| 1311 } // namespace password_manager | 1309 } // namespace password_manager |
| OLD | NEW |