Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: chrome/browser/safe_browsing/srt_fetcher_win.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/srt_fetcher_browsertest_win.cc ('k') | chrome/browser/safe_browsing/threat_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698