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/srt_fetcher_win.h" | 5 #include "chrome/browser/safe_browsing/srt_fetcher_win.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } | 306 } |
307 | 307 |
308 private: | 308 private: |
309 ~SRTFetcher() override {} | 309 ~SRTFetcher() override {} |
310 | 310 |
311 // The user profile. | 311 // The user profile. |
312 Profile* profile_; | 312 Profile* profile_; |
313 | 313 |
314 // The underlying URL fetcher. The instance is alive from construction through | 314 // The underlying URL fetcher. The instance is alive from construction through |
315 // OnURLFetchComplete. | 315 // OnURLFetchComplete. |
316 scoped_ptr<net::URLFetcher> url_fetcher_; | 316 std::unique_ptr<net::URLFetcher> url_fetcher_; |
317 | 317 |
318 DISALLOW_COPY_AND_ASSIGN(SRTFetcher); | 318 DISALLOW_COPY_AND_ASSIGN(SRTFetcher); |
319 }; | 319 }; |
320 | 320 |
321 namespace { | 321 namespace { |
322 | 322 |
323 // Try to fetch the SRT, and on success, show the prompt to run it. | 323 // Try to fetch the SRT, and on success, show the prompt to run it. |
324 void MaybeFetchSRT(Browser* browser, const base::Version& reporter_version) { | 324 void MaybeFetchSRT(Browser* browser, const base::Version& reporter_version) { |
325 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 325 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
326 | 326 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 | 659 |
660 void SetReporterLauncherForTesting(const ReporterLauncher& reporter_launcher) { | 660 void SetReporterLauncherForTesting(const ReporterLauncher& reporter_launcher) { |
661 g_reporter_launcher_ = reporter_launcher; | 661 g_reporter_launcher_ = reporter_launcher; |
662 } | 662 } |
663 | 663 |
664 void SetPromptTriggerForTesting(const PromptTrigger& prompt_trigger) { | 664 void SetPromptTriggerForTesting(const PromptTrigger& prompt_trigger) { |
665 g_prompt_trigger_ = prompt_trigger; | 665 g_prompt_trigger_ = prompt_trigger; |
666 } | 666 } |
667 | 667 |
668 } // namespace safe_browsing | 668 } // namespace safe_browsing |
OLD | NEW |