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

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

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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_win.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy zer_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility>
10
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/path_service.h" 15 #include "base/path_service.h"
14 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incid ent.h" 16 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incid ent.h"
15 #include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h" 17 #include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h"
16 #include "chrome/common/chrome_version.h" 18 #include "chrome/common/chrome_version.h"
17 #include "chrome/common/safe_browsing/binary_feature_extractor.h" 19 #include "chrome/common/safe_browsing/binary_feature_extractor.h"
18 #include "chrome/common/safe_browsing/csd.pb.h" 20 #include "chrome/common/safe_browsing/csd.pb.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if (!signature_info->trusted()) { 74 if (!signature_info->trusted()) {
73 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> 75 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
74 incident( 76 incident(
75 new ClientIncidentReport_IncidentData_BinaryIntegrityIncident()); 77 new ClientIncidentReport_IncidentData_BinaryIntegrityIncident());
76 78
77 incident->set_file_basename(binary_path.BaseName().AsUTF8Unsafe()); 79 incident->set_file_basename(binary_path.BaseName().AsUTF8Unsafe());
78 incident->set_allocated_signature(signature_info.release()); 80 incident->set_allocated_signature(signature_info.release());
79 81
80 // Send the report. 82 // Send the report.
81 incident_receiver->AddIncidentForProcess( 83 incident_receiver->AddIncidentForProcess(
82 make_scoped_ptr(new BinaryIntegrityIncident(incident.Pass()))); 84 make_scoped_ptr(new BinaryIntegrityIncident(std::move(incident))));
83 } else { 85 } else {
84 // The binary is integral, remove previous report so that next incidents 86 // The binary is integral, remove previous report so that next incidents
85 // for the binary will be reported. 87 // for the binary will be reported.
86 ClearBinaryIntegrityForFile(incident_receiver.get(), 88 ClearBinaryIntegrityForFile(incident_receiver.get(),
87 binary_path.BaseName().AsUTF8Unsafe()); 89 binary_path.BaseName().AsUTF8Unsafe());
88 } 90 }
89 } 91 }
90 } 92 }
91 93
92 } // namespace safe_browsing 94 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698