| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/json/json_writer.h" | 5 #include "base/json/json_writer.h" |
| 6 #include "base/macros.h" |
| 6 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 7 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 8 #include "base/test/histogram_tester.h" | 9 #include "base/test/histogram_tester.h" |
| 9 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "build/build_config.h" |
| 10 #include "components/password_manager/core/browser/password_manager.h" | 12 #include "components/password_manager/core/browser/password_manager.h" |
| 11 #include "components/password_manager/core/common/password_manager_pref_names.h" | 13 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 12 #include "components/password_manager/sync/browser/password_manager_setting_migr
ator_service.h" | 14 #include "components/password_manager/sync/browser/password_manager_setting_migr
ator_service.h" |
| 13 #include "components/pref_registry/testing_pref_service_syncable.h" | 15 #include "components/pref_registry/testing_pref_service_syncable.h" |
| 14 #include "components/sync_driver/fake_sync_service.h" | 16 #include "components/sync_driver/fake_sync_service.h" |
| 15 #include "components/syncable_prefs/pref_model_associator_client.h" | 17 #include "components/syncable_prefs/pref_model_associator_client.h" |
| 16 #include "components/syncable_prefs/pref_service_mock_factory.h" | 18 #include "components/syncable_prefs/pref_service_mock_factory.h" |
| 17 #include "components/syncable_prefs/pref_service_syncable.h" | 19 #include "components/syncable_prefs/pref_service_syncable.h" |
| 18 #include "sync/api/fake_sync_change_processor.h" | 20 #include "sync/api/fake_sync_change_processor.h" |
| 19 #include "sync/api/sync_error_factory.h" | 21 #include "sync/api/sync_error_factory.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); | 452 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); |
| 451 profile_sync_service()->SetCanSyncStart(false); | 453 profile_sync_service()->SetCanSyncStart(false); |
| 452 base::HistogramTester tester; | 454 base::HistogramTester tester; |
| 453 NotifyProfileAdded(); | 455 NotifyProfileAdded(); |
| 454 ExpectValuesForBothPrefValues(true, true); | 456 ExpectValuesForBothPrefValues(true, true); |
| 455 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), | 457 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), |
| 456 testing::ElementsAre(base::Bucket(I11F11, 1))); | 458 testing::ElementsAre(base::Bucket(I11F11, 1))); |
| 457 } | 459 } |
| 458 | 460 |
| 459 } // namespace password_manager | 461 } // namespace password_manager |
| OLD | NEW |