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

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc

Issue 1200053004: Move more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/events/ozone/evdev/libgestures_glue/gesture_feedback.h" 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_feedback.h"
6 6
7 #include <time.h> 7 #include <time.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 if (!strftime(buffer, kTouchLogTimestampMaxSize, "%Y%m%d-%H%M%S", &timeinfo)) 94 if (!strftime(buffer, kTouchLogTimestampMaxSize, "%Y%m%d-%H%M%S", &timeinfo))
95 return ""; 95 return "";
96 return std::string(buffer); 96 return std::string(buffer);
97 } 97 }
98 98
99 // Canonize the device name for logging. 99 // Canonize the device name for logging.
100 std::string GetCanonicalDeviceName(const std::string& name) { 100 std::string GetCanonicalDeviceName(const std::string& name) {
101 std::string ret(name); 101 std::string ret(name);
102 for (size_t i = 0; i < ret.size(); ++i) 102 for (size_t i = 0; i < ret.size(); ++i)
103 if (!IsAsciiAlpha(ret[i])) 103 if (!base::IsAsciiAlpha(ret[i]))
104 ret[i] = '_'; 104 ret[i] = '_';
105 return ret; 105 return ret;
106 } 106 }
107 107
108 // Name event logs in a way that is compatible with existing toolchain. 108 // Name event logs in a way that is compatible with existing toolchain.
109 std::string GenerateEventLogName(GesturePropertyProvider* provider, 109 std::string GenerateEventLogName(GesturePropertyProvider* provider,
110 const base::FilePath& out_dir, 110 const base::FilePath& out_dir,
111 const std::string& prefix, 111 const std::string& prefix,
112 const std::string& now, 112 const std::string& now,
113 int id) { 113 int id) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 // Compress touchpad/mouse logs on another thread and return. 212 // Compress touchpad/mouse logs on another thread and return.
213 base::WorkerPool::PostTaskAndReply( 213 base::WorkerPool::PostTaskAndReply(
214 FROM_HERE, 214 FROM_HERE,
215 base::Bind(&CompressDumpedLog, base::Passed(&log_paths_to_be_compressed)), 215 base::Bind(&CompressDumpedLog, base::Passed(&log_paths_to_be_compressed)),
216 base::Bind(reply, base::Passed(&log_paths)), true /* task_is_slow */); 216 base::Bind(reply, base::Passed(&log_paths)), true /* task_is_slow */);
217 } 217 }
218 218
219 } // namespace ui 219 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698