| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/autofill_metrics.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // Order of destruction is important as AutofillManager relies on | 361 // Order of destruction is important as AutofillManager relies on |
| 362 // PersonalDataManager to be around when it gets destroyed. | 362 // PersonalDataManager to be around when it gets destroyed. |
| 363 autofill_manager_.reset(); | 363 autofill_manager_.reset(); |
| 364 autofill_driver_.reset(); | 364 autofill_driver_.reset(); |
| 365 personal_data_.reset(); | 365 personal_data_.reset(); |
| 366 signin_manager_->Shutdown(); | 366 signin_manager_->Shutdown(); |
| 367 signin_manager_.reset(); | 367 signin_manager_.reset(); |
| 368 account_tracker_->Shutdown(); | 368 account_tracker_->Shutdown(); |
| 369 account_tracker_.reset(); | 369 account_tracker_.reset(); |
| 370 signin_client_.reset(); | 370 signin_client_.reset(); |
| 371 test::ReenableSystemServices(); |
| 371 } | 372 } |
| 372 | 373 |
| 373 void AutofillMetricsTest::EnableWalletSync() { | 374 void AutofillMetricsTest::EnableWalletSync() { |
| 374 signin_manager_->SetAuthenticatedAccountInfo("12345", "syncuser@example.com"); | 375 signin_manager_->SetAuthenticatedAccountInfo("12345", "syncuser@example.com"); |
| 375 } | 376 } |
| 376 | 377 |
| 377 // Test that we log quality metrics appropriately. | 378 // Test that we log quality metrics appropriately. |
| 378 TEST_F(AutofillMetricsTest, QualityMetrics) { | 379 TEST_F(AutofillMetricsTest, QualityMetrics) { |
| 379 // Set up our form data. | 380 // Set up our form data. |
| 380 FormData form; | 381 FormData form; |
| (...skipping 3498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3879 EXPECT_THAT( | 3880 EXPECT_THAT( |
| 3880 histogram_tester.GetAllSamples("Autofill.ServerResponseHasDataForForm"), | 3881 histogram_tester.GetAllSamples("Autofill.ServerResponseHasDataForForm"), |
| 3881 ElementsAre(Bucket(true, 2))); | 3882 ElementsAre(Bucket(true, 2))); |
| 3882 | 3883 |
| 3883 // No RAPPOR metrics are logged in the case there is at least some server data | 3884 // No RAPPOR metrics are logged in the case there is at least some server data |
| 3884 // available for all forms. | 3885 // available for all forms. |
| 3885 EXPECT_EQ(0, rappor_service_.GetReportsCount()); | 3886 EXPECT_EQ(0, rappor_service_.GetReportsCount()); |
| 3886 } | 3887 } |
| 3887 | 3888 |
| 3888 } // namespace autofill | 3889 } // namespace autofill |
| OLD | NEW |