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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/sync/profile_sync_service_factory.h" | 10 #include "chrome/browser/sync/profile_sync_service_factory.h" |
11 #include "chrome/browser/sync/profile_sync_service_mock.h" | 11 #include "chrome/browser/sync/profile_sync_service_mock.h" |
12 #include "chrome/common/chrome_version_info.h" | 12 #include "chrome/common/chrome_version_info.h" |
13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
15 #include "components/autofill/content/common/autofill_messages.h" | 15 #include "components/autofill/content/common/autofill_messages.h" |
16 #include "components/password_manager/content/browser/password_manager_internals
_service_factory.h" | 16 #include "components/password_manager/content/browser/password_manager_internals
_service_factory.h" |
17 #include "components/password_manager/content/common/credential_manager_messages
.h" | 17 #include "components/password_manager/content/common/credential_manager_messages
.h" |
18 #include "components/password_manager/content/common/credential_manager_types.h" | |
19 #include "components/password_manager/core/browser/log_receiver.h" | 18 #include "components/password_manager/core/browser/log_receiver.h" |
20 #include "components/password_manager/core/browser/password_manager_internals_se
rvice.h" | 19 #include "components/password_manager/core/browser/password_manager_internals_se
rvice.h" |
| 20 #include "components/password_manager/core/common/credential_manager_types.h" |
21 #include "components/password_manager/core/common/password_manager_switches.h" | 21 #include "components/password_manager/core/common/password_manager_switches.h" |
22 #include "content/public/browser/browser_context.h" | 22 #include "content/public/browser/browser_context.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/test/mock_render_process_host.h" | 24 #include "content/public/test/mock_render_process_host.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 using content::BrowserContext; | 28 using content::BrowserContext; |
29 using content::WebContents; | 29 using content::WebContents; |
30 using testing::Return; | 30 using testing::Return; |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 381 |
382 // Again, without a custom passphrase. | 382 // Again, without a custom passphrase. |
383 EXPECT_CALL(*mock_sync_service, IsUsingSecondaryPassphrase()) | 383 EXPECT_CALL(*mock_sync_service, IsUsingSecondaryPassphrase()) |
384 .WillRepeatedly(Return(false)); | 384 .WillRepeatedly(Return(false)); |
385 | 385 |
386 EXPECT_FALSE( | 386 EXPECT_FALSE( |
387 client->IsPasswordSyncEnabled(password_manager::ONLY_CUSTOM_PASSPHRASE)); | 387 client->IsPasswordSyncEnabled(password_manager::ONLY_CUSTOM_PASSPHRASE)); |
388 EXPECT_FALSE(client->IsPasswordSyncEnabled( | 388 EXPECT_FALSE(client->IsPasswordSyncEnabled( |
389 password_manager::WITHOUT_CUSTOM_PASSPHRASE)); | 389 password_manager::WITHOUT_CUSTOM_PASSPHRASE)); |
390 } | 390 } |
OLD | NEW |