| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 MOCK_METHOD0(IsExtendedReporting, bool()); | 84 MOCK_METHOD0(IsExtendedReporting, bool()); |
| 85 MOCK_METHOD0(IsIncognito, bool()); | 85 MOCK_METHOD0(IsIncognito, bool()); |
| 86 MOCK_METHOD2(IsPingingEnabled, bool(const base::Feature&, RequestOutcome*)); | 86 MOCK_METHOD2(IsPingingEnabled, bool(const base::Feature&, RequestOutcome*)); |
| 87 MOCK_METHOD0(IsHistorySyncEnabled, bool()); | 87 MOCK_METHOD0(IsHistorySyncEnabled, bool()); |
| 88 MOCK_METHOD4(MaybeStartPasswordFieldOnFocusRequest, | 88 MOCK_METHOD4(MaybeStartPasswordFieldOnFocusRequest, |
| 89 void(WebContents*, const GURL&, const GURL&, const GURL&)); | 89 void(WebContents*, const GURL&, const GURL&, const GURL&)); |
| 90 MOCK_METHOD4(MaybeStartProtectedPasswordEntryRequest, | 90 MOCK_METHOD4(MaybeStartProtectedPasswordEntryRequest, |
| 91 void(WebContents*, const GURL&, const std::string&, bool)); | 91 void(WebContents*, const GURL&, const std::string&, bool)); |
| 92 MOCK_METHOD3(ShowPhishingInterstitial, | 92 MOCK_METHOD3(ShowPhishingInterstitial, |
| 93 void(const GURL&, const std::string&, content::WebContents*)); | 93 void(const GURL&, const std::string&, content::WebContents*)); |
| 94 MOCK_METHOD0(GetSyncAccountType, |
| 95 safe_browsing::PasswordProtectionService::SyncAccountType()); |
| 94 | 96 |
| 95 private: | 97 private: |
| 96 DISALLOW_COPY_AND_ASSIGN(MockPasswordProtectionService); | 98 DISALLOW_COPY_AND_ASSIGN(MockPasswordProtectionService); |
| 97 }; | 99 }; |
| 98 #endif | 100 #endif |
| 99 | 101 |
| 100 // TODO(vabr): Get rid of the mocked client in the client's own test, see | 102 // TODO(vabr): Get rid of the mocked client in the client's own test, see |
| 101 // http://crbug.com/474577. | 103 // http://crbug.com/474577. |
| 102 class MockChromePasswordManagerClient : public ChromePasswordManagerClient { | 104 class MockChromePasswordManagerClient : public ChromePasswordManagerClient { |
| 103 public: | 105 public: |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 web_contents()->GetBrowserContext(), nullptr)); | 637 web_contents()->GetBrowserContext(), nullptr)); |
| 636 std::unique_ptr<MockChromePasswordManagerClient> client( | 638 std::unique_ptr<MockChromePasswordManagerClient> client( |
| 637 new MockChromePasswordManagerClient(test_web_contents.get())); | 639 new MockChromePasswordManagerClient(test_web_contents.get())); |
| 638 EXPECT_CALL(*client->password_protection_service(), | 640 EXPECT_CALL(*client->password_protection_service(), |
| 639 MaybeStartProtectedPasswordEntryRequest(_, _, _, true)) | 641 MaybeStartProtectedPasswordEntryRequest(_, _, _, true)) |
| 640 .Times(1); | 642 .Times(1); |
| 641 client->CheckProtectedPasswordEntry(std::string("saved_domain.com"), true); | 643 client->CheckProtectedPasswordEntry(std::string("saved_domain.com"), true); |
| 642 } | 644 } |
| 643 | 645 |
| 644 #endif | 646 #endif |
| OLD | NEW |