| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/safe_browsing/incident_reporting/extension_data_collect
ion.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/extension_data_collect
ion.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 safe_browsing_opt_in == SAFE_BROWSING_OPT_IN); | 152 safe_browsing_opt_in == SAFE_BROWSING_OPT_IN); |
| 153 prefs->SetBoolean(prefs::kSafeBrowsingExtendedReportingEnabled, | 153 prefs->SetBoolean(prefs::kSafeBrowsingExtendedReportingEnabled, |
| 154 safe_browsing_opt_in == SAFE_BROWSING_OPT_IN); | 154 safe_browsing_opt_in == SAFE_BROWSING_OPT_IN); |
| 155 TestingProfile* profile = profile_manager_->CreateTestingProfile( | 155 TestingProfile* profile = profile_manager_->CreateTestingProfile( |
| 156 profile_name, std::move(prefs), | 156 profile_name, std::move(prefs), |
| 157 base::UTF8ToUTF16(profile_name), // user_name | 157 base::UTF8ToUTF16(profile_name), // user_name |
| 158 0, // avatar_id | 158 0, // avatar_id |
| 159 std::string(), // supervised_user_id | 159 std::string(), // supervised_user_id |
| 160 TestingProfile::TestingFactories()); | 160 TestingProfile::TestingFactories()); |
| 161 | 161 |
| 162 return base::WrapUnique(new ExtensionTestingProfile(profile)); | 162 return base::MakeUnique<ExtensionTestingProfile>(profile); |
| 163 } | 163 } |
| 164 | 164 |
| 165 content::TestBrowserThreadBundle browser_thread_bundle_; | 165 content::TestBrowserThreadBundle browser_thread_bundle_; |
| 166 std::unique_ptr<TestingProfileManager> profile_manager_; | 166 std::unique_ptr<TestingProfileManager> profile_manager_; |
| 167 | 167 |
| 168 private: | 168 private: |
| 169 int profile_number_; | 169 int profile_number_; |
| 170 | 170 |
| 171 #if defined OS_CHROMEOS | 171 #if defined OS_CHROMEOS |
| 172 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 172 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 ASSERT_TRUE(data.has_last_installed_extension()); | 288 ASSERT_TRUE(data.has_last_installed_extension()); |
| 289 ClientIncidentReport_ExtensionData_ExtensionInfo extension_info = | 289 ClientIncidentReport_ExtensionData_ExtensionInfo extension_info = |
| 290 data.last_installed_extension(); | 290 data.last_installed_extension(); |
| 291 | 291 |
| 292 ASSERT_EQ(extension_info.id(), extension_id); | 292 ASSERT_EQ(extension_info.id(), extension_id); |
| 293 ASSERT_EQ(extension_info.name(), extension_name); | 293 ASSERT_EQ(extension_info.name(), extension_name); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace safe_browsing | 296 } // namespace safe_browsing |
| OLD | NEW |