OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/component_updater/sw_reporter_installer_win.h" | 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/feature_list.h" | 15 #include "base/feature_list.h" |
16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
17 #include "base/json/json_reader.h" | 17 #include "base/json/json_reader.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/metrics/field_trial.h" | 19 #include "base/metrics/field_trial.h" |
20 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
21 #include "base/test/histogram_tester.h" | 21 #include "base/test/histogram_tester.h" |
22 #include "base/test/scoped_feature_list.h" | 22 #include "base/test/scoped_feature_list.h" |
23 #include "base/values.h" | 23 #include "base/values.h" |
24 #include "base/version.h" | 24 #include "base/version.h" |
25 #include "chrome/browser/safe_browsing/srt_fetcher_win.h" | 25 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_fetcher_win.h" |
26 #include "components/chrome_cleaner/public/constants/constants.h" | 26 #include "components/chrome_cleaner/public/constants/constants.h" |
27 #include "components/variations/variations_params_manager.h" | 27 #include "components/variations/variations_params_manager.h" |
28 #include "content/public/test/test_browser_thread_bundle.h" | 28 #include "content/public/test/test_browser_thread_bundle.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 namespace component_updater { | 31 namespace component_updater { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 constexpr char kExperimentGroupName[] = "my_test_engine_group"; | 35 constexpr char kExperimentGroupName[] = "my_test_engine_group"; |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 traits.ComponentReady( | 729 traits.ComponentReady( |
730 default_version_, default_path_, | 730 default_version_, default_path_, |
731 base::DictionaryValue::From(base::JSONReader::Read(kTestManifest))); | 731 base::DictionaryValue::From(base::JSONReader::Read(kTestManifest))); |
732 | 732 |
733 // The SwReporter should not be launched, and an error should be logged. | 733 // The SwReporter should not be launched, and an error should be logged. |
734 EXPECT_TRUE(launched_invocations_.empty()); | 734 EXPECT_TRUE(launched_invocations_.empty()); |
735 histograms_.ExpectUniqueSample(kErrorHistogramName, | 735 histograms_.ExpectUniqueSample(kErrorHistogramName, |
736 SW_REPORTER_EXPERIMENT_ERROR_BAD_PARAMS, 1); | 736 SW_REPORTER_EXPERIMENT_ERROR_BAD_PARAMS, 1); |
737 } | 737 } |
738 } // namespace component_updater | 738 } // namespace component_updater |
OLD | NEW |