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

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

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/blacklist_load_analyze r.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyze r.h"
6 6
7 #include "base/file_version_info.h" 7 #include "base/file_version_info.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 16 matching lines...) Expand all
27 // Returns true if successful, false otherwise. 27 // Returns true if successful, false otherwise.
28 bool GetLoadedBlacklistedModules(std::vector<base::string16>* module_names) { 28 bool GetLoadedBlacklistedModules(std::vector<base::string16>* module_names) {
29 DCHECK(module_names); 29 DCHECK(module_names);
30 30
31 std::set<ModuleInfo> module_info_set; 31 std::set<ModuleInfo> module_info_set;
32 if (!GetLoadedModules(&module_info_set)) 32 if (!GetLoadedModules(&module_info_set))
33 return false; 33 return false;
34 34
35 std::set<ModuleInfo>::const_iterator module_iter(module_info_set.begin()); 35 std::set<ModuleInfo>::const_iterator module_iter(module_info_set.begin());
36 for (; module_iter != module_info_set.end(); ++module_iter) { 36 for (; module_iter != module_info_set.end(); ++module_iter) {
37 base::string16 module_file_name(base::StringToLowerASCII( 37 base::string16 module_file_name(base::ToLowerASCII(
38 base::FilePath(module_iter->name).BaseName().value())); 38 base::FilePath(module_iter->name).BaseName().value()));
39 if (blacklist::GetBlacklistIndex(module_file_name.c_str()) != -1) { 39 if (blacklist::GetBlacklistIndex(module_file_name.c_str()) != -1) {
40 module_names->push_back(module_iter->name); 40 module_names->push_back(module_iter->name);
41 } 41 }
42 } 42 }
43 43
44 return true; 44 return true;
45 } 45 }
46 46
47 void VerifyBlacklistLoadState(scoped_ptr<IncidentReceiver> incident_receiver) { 47 void VerifyBlacklistLoadState(scoped_ptr<IncidentReceiver> incident_receiver) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 // Send the report. 103 // Send the report.
104 incident_receiver->AddIncidentForProcess( 104 incident_receiver->AddIncidentForProcess(
105 make_scoped_ptr(new BlacklistLoadIncident(blacklist_load.Pass()))); 105 make_scoped_ptr(new BlacklistLoadIncident(blacklist_load.Pass())));
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 } // namespace safe_browsing 110 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698