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

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

Issue 470213002: Moving all the incident reporting stuff to a common folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@binsign
Patch Set: Created 6 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/safe_browsing/binary_integrity_analyzer.h"
6
7 #include "base/files/file_path.h"
8 #include "base/logging.h"
9 #include "base/path_service.h"
10 #include "version.h" // NOLINT
11
12 namespace safe_browsing {
13
14 std::vector<base::FilePath> GetCriticalBinariesPath() {
15 static const base::FilePath::CharType* const kUnversionedFiles[] = {
16 FILE_PATH_LITERAL("chrome.exe"),
17 };
18 static const base::FilePath::CharType* const kVersionedFiles[] = {
19 FILE_PATH_LITERAL("chrome.dll"),
20 FILE_PATH_LITERAL("chrome_child.dll"),
21 FILE_PATH_LITERAL("chrome_elf.dll"),
22 };
23
24 // Find where chrome.exe is installed.
25 base::FilePath chrome_exe_dir;
26 if (!PathService::Get(base::DIR_EXE, &chrome_exe_dir))
27 NOTREACHED();
28
29 std::vector<base::FilePath> critical_binaries;
30 critical_binaries.reserve(arraysize(kUnversionedFiles) +
31 arraysize(kVersionedFiles));
32
33 for (size_t i = 0; i < arraysize(kUnversionedFiles); ++i) {
34 critical_binaries.push_back(chrome_exe_dir.Append(kUnversionedFiles[i]));
35 }
36
37 base::FilePath version_dir(
38 chrome_exe_dir.AppendASCII(CHROME_VERSION_STRING));
39 for (size_t i = 0; i < arraysize(kVersionedFiles); ++i) {
40 critical_binaries.push_back(version_dir.Append(kVersionedFiles[i]));
41 }
42
43 return critical_binaries;
44 }
45
46 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698