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

Side by Side Diff: chrome/browser/conflicts/module_database_win.cc

Issue 2653333002: [win] Create utilities for helping to populate ModuleDatabase. (Closed)
Patch Set: Created 3 years, 10 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/conflicts/module_database_win.h" 5 #include "chrome/browser/conflicts/module_database_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <tuple> 8 #include <tuple>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 bool ModuleDatabase::ModuleInfoKey::operator<(const ModuleInfoKey& mik) const { 334 bool ModuleDatabase::ModuleInfoKey::operator<(const ModuleInfoKey& mik) const {
335 // The key consists of the triplet of 335 // The key consists of the triplet of
336 // (module_path, module_size, module_time_date_stamp). 336 // (module_path, module_size, module_time_date_stamp).
337 // Use the std::tuple lexicographic comparison operator. 337 // Use the std::tuple lexicographic comparison operator.
338 return std::make_tuple(module_path, module_size, module_time_date_stamp) < 338 return std::make_tuple(module_path, module_size, module_time_date_stamp) <
339 std::make_tuple(mik.module_path, mik.module_size, 339 std::make_tuple(mik.module_path, mik.module_size,
340 mik.module_time_date_stamp); 340 mik.module_time_date_stamp);
341 } 341 }
342 342
343 // ModuleDatabase::CertificateInfo ---------------------------------------------
344
345 ModuleDatabase::CertificateInfo::CertificateInfo() : type(NO_CERTIFICATE) {}
346
343 // ModuleDatabase::ModuleInfoData ---------------------------------------------- 347 // ModuleDatabase::ModuleInfoData ----------------------------------------------
344 348
345 ModuleDatabase::ModuleInfoData::ModuleInfoData() : process_types(0) {} 349 ModuleDatabase::ModuleInfoData::ModuleInfoData() : process_types(0) {}
Patrick Monette 2017/01/26 20:49:07 Change to PROCESS_TYPE_UNKNOWN whose value is 1. T
chrisha 2017/02/06 18:38:45 This is a bitmask of the various process types. 0
346 350
351 ModuleDatabase::ModuleInfoData::ModuleInfoData(const ModuleInfoData& others) =
352 default;
353
354 ModuleDatabase::ModuleInfoData::~ModuleInfoData() {}
Patrick Monette 2017/01/26 20:49:07 = default;
chrisha 2017/02/06 18:38:45 Done.
355
347 // ModuleDatabase::ProcessInfoKey ---------------------------------------------- 356 // ModuleDatabase::ProcessInfoKey ----------------------------------------------
348 357
349 ModuleDatabase::ProcessInfoKey::ProcessInfoKey( 358 ModuleDatabase::ProcessInfoKey::ProcessInfoKey(
350 uint32_t process_id, 359 uint32_t process_id,
351 uint64_t creation_time, 360 uint64_t creation_time,
352 content::ProcessType process_type) 361 content::ProcessType process_type)
353 : process_id(process_id), 362 : process_id(process_id),
354 creation_time(creation_time), 363 creation_time(creation_time),
355 process_type(process_type) {} 364 process_type(process_type) {}
356 365
357 ModuleDatabase::ProcessInfoKey::~ProcessInfoKey() = default; 366 ModuleDatabase::ProcessInfoKey::~ProcessInfoKey() = default;
358 367
359 bool ModuleDatabase::ProcessInfoKey::operator<( 368 bool ModuleDatabase::ProcessInfoKey::operator<(
360 const ProcessInfoKey& pik) const { 369 const ProcessInfoKey& pik) const {
361 // The key consists of the pair of (process_id, creation_time). 370 // The key consists of the pair of (process_id, creation_time).
362 // Use the std::tuple lexicographic comparison operator. 371 // Use the std::tuple lexicographic comparison operator.
363 return std::make_tuple(process_id, creation_time) < 372 return std::make_tuple(process_id, creation_time) <
364 std::make_tuple(pik.process_id, pik.creation_time); 373 std::make_tuple(pik.process_id, pik.creation_time);
365 } 374 }
366 375
367 // ModuleDatabase::ProcessInfoData --------------------------------------------- 376 // ModuleDatabase::ProcessInfoData ---------------------------------------------
368 377
369 ModuleDatabase::ProcessInfoData::ProcessInfoData() = default; 378 ModuleDatabase::ProcessInfoData::ProcessInfoData() = default;
370 379
371 ModuleDatabase::ProcessInfoData::ProcessInfoData(const ProcessInfoData& other) = 380 ModuleDatabase::ProcessInfoData::ProcessInfoData(const ProcessInfoData& other) =
372 default; 381 default;
373 382
374 ModuleDatabase::ProcessInfoData::~ProcessInfoData() = default; 383 ModuleDatabase::ProcessInfoData::~ProcessInfoData() = default;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698