| 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/chrome_cleaner/srt_fetcher_win.h" | 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_fetcher_win.h" |
| 6 | 6 |
| 7 #include <initializer_list> | 7 #include <initializer_list> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 chrome_cleaner::mojom::ChromePromptRequest request, | 265 chrome_cleaner::mojom::ChromePromptRequest request, |
| 266 bool bad_message_expected, | 266 bool bad_message_expected, |
| 267 base::Closure on_connection_closed) | 267 base::Closure on_connection_closed) |
| 268 : ChromePromptImpl(std::move(request), std::move(on_connection_closed)), | 268 : ChromePromptImpl(std::move(request), std::move(on_connection_closed)), |
| 269 bad_message_expected_(bad_message_expected) {} | 269 bad_message_expected_(bad_message_expected) {} |
| 270 ~ReportBadMessageChromePromptImpl() override = default; | 270 ~ReportBadMessageChromePromptImpl() override = default; |
| 271 | 271 |
| 272 void PromptUser( | 272 void PromptUser( |
| 273 std::vector<chrome_cleaner::mojom::UwSPtr> removable_uws_found, | 273 std::vector<chrome_cleaner::mojom::UwSPtr> removable_uws_found, |
| 274 chrome_cleaner::mojom::ElevationStatus elevation_status, | 274 chrome_cleaner::mojom::ElevationStatus elevation_status, |
| 275 const chrome_cleaner::mojom::ChromePrompt::PromptUserCallback& callback) | 275 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback callback) |
| 276 override { | 276 override { |
| 277 if (bad_message_expected_) | 277 if (bad_message_expected_) |
| 278 mojo::ReportBadMessage("bad message"); | 278 mojo::ReportBadMessage("bad message"); |
| 279 | 279 |
| 280 ChromePromptImpl::PromptUser(std::move(removable_uws_found), | 280 ChromePromptImpl::PromptUser(std::move(removable_uws_found), |
| 281 elevation_status, callback); | 281 elevation_status, std::move(callback)); |
| 282 } | 282 } |
| 283 | 283 |
| 284 private: | 284 private: |
| 285 bool bad_message_expected_ = false; | 285 bool bad_message_expected_ = false; |
| 286 | 286 |
| 287 DISALLOW_COPY_AND_ASSIGN(ReportBadMessageChromePromptImpl); | 287 DISALLOW_COPY_AND_ASSIGN(ReportBadMessageChromePromptImpl); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 // Parameters for this test: | 290 // Parameters for this test: |
| 291 // - bool in_browser_cleaner_ui: indicates if InBrowserCleanerUI experiment | 291 // - bool in_browser_cleaner_ui: indicates if InBrowserCleanerUI experiment |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 // testing framework. | 960 // testing framework. |
| 961 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorNoFile) { | 961 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorNoFile) { |
| 962 RunDialog(); | 962 RunDialog(); |
| 963 } | 963 } |
| 964 | 964 |
| 965 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorFile) { | 965 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorFile) { |
| 966 RunDialog(); | 966 RunDialog(); |
| 967 } | 967 } |
| 968 | 968 |
| 969 } // namespace safe_browsing | 969 } // namespace safe_browsing |
| OLD | NEW |