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

Side by Side Diff: chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/system_logs/touch_log_source.h" 5 #include "chrome/browser/chromeos/system_logs/touch_log_source.h"
6 6
7 #include "ash/touch/touch_hud_debug.h" 7 #include "ash/touch/touch_hud_debug.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // 58 //
59 // This is used to distinguish touchpad/mice logs from touchscreen logs. 59 // This is used to distinguish touchpad/mice logs from touchscreen logs.
60 std::string GetEventLogListOfOnePrefix( 60 std::string GetEventLogListOfOnePrefix(
61 const std::vector<base::FilePath>& log_paths, 61 const std::vector<base::FilePath>& log_paths,
62 const std::string& prefix, 62 const std::string& prefix,
63 const int max_log_count) { 63 const int max_log_count) {
64 int collected = 0; 64 int collected = 0;
65 std::string log_list; 65 std::string log_list;
66 for (size_t i = 0; i < log_paths.size(); ++i) { 66 for (size_t i = 0; i < log_paths.size(); ++i) {
67 const std::string basename = log_paths[i].BaseName().value(); 67 const std::string basename = log_paths[i].BaseName().value();
68 if (StartsWithASCII(basename, prefix, true)) { 68 if (base::StartsWithASCII(basename, prefix, true)) {
69 log_list.append(" " + log_paths[i].value()); 69 log_list.append(" " + log_paths[i].value());
70 70
71 // Limit the max number of collected logs to shorten the log collection 71 // Limit the max number of collected logs to shorten the log collection
72 // process. 72 // process.
73 if (++collected >= max_log_count) 73 if (++collected >= max_log_count)
74 break; 74 break;
75 } 75 }
76 } 76 }
77 77
78 return log_list; 78 return log_list;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse); 173 scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse);
174 CollectTouchHudDebugLog(response.get()); 174 CollectTouchHudDebugLog(response.get());
175 175
176 // Collect touch device status logs. 176 // Collect touch device status logs.
177 ui::OzonePlatform::GetInstance()->GetInputController()->GetTouchDeviceStatus( 177 ui::OzonePlatform::GetInstance()->GetInputController()->GetTouchDeviceStatus(
178 base::Bind(&OnStatusLogCollected, base::Passed(&response), callback)); 178 base::Bind(&OnStatusLogCollected, base::Passed(&response), callback));
179 } 179 }
180 180
181 } // namespace system_logs 181 } // namespace system_logs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698