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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/binary_integrity_analy zer.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy zer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
12 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
15 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
16 #include "base/time/time.h" 17 #include "base/time/time.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
(...skipping 18 matching lines...) Expand all
36 37
37 signature_verification_time_histogram->AddTime(verification_time); 38 signature_verification_time_histogram->AddTime(verification_time);
38 } 39 }
39 40
40 void ClearBinaryIntegrityForFile(IncidentReceiver* incident_receiver, 41 void ClearBinaryIntegrityForFile(IncidentReceiver* incident_receiver,
41 const std::string& basename) { 42 const std::string& basename) {
42 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> 43 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
43 incident(new ClientIncidentReport_IncidentData_BinaryIntegrityIncident()); 44 incident(new ClientIncidentReport_IncidentData_BinaryIntegrityIncident());
44 incident->set_file_basename(basename); 45 incident->set_file_basename(basename);
45 incident_receiver->ClearIncidentForProcess( 46 incident_receiver->ClearIncidentForProcess(
46 make_scoped_ptr(new BinaryIntegrityIncident(incident.Pass()))); 47 make_scoped_ptr(new BinaryIntegrityIncident(std::move(incident))));
47 } 48 }
48 49
49 void RegisterBinaryIntegrityAnalysis() { 50 void RegisterBinaryIntegrityAnalysis() {
50 #if defined(OS_WIN) || defined(OS_MACOSX) 51 #if defined(OS_WIN) || defined(OS_MACOSX)
51 scoped_refptr<SafeBrowsingService> safe_browsing_service( 52 scoped_refptr<SafeBrowsingService> safe_browsing_service(
52 g_browser_process->safe_browsing_service()); 53 g_browser_process->safe_browsing_service());
53 54
54 safe_browsing_service->RegisterDelayedAnalysisCallback( 55 safe_browsing_service->RegisterDelayedAnalysisCallback(
55 base::Bind(&VerifyBinaryIntegrity)); 56 base::Bind(&VerifyBinaryIntegrity));
56 #endif 57 #endif
57 } 58 }
58 59
59 } // namespace safe_browsing 60 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698