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

Side by Side Diff: tools/clang/blink_gc_plugin/Config.h

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
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file defines the names used by GC infrastructure. 5 // This file defines the names used by GC infrastructure.
6 6
7 // TODO: Restructure the name determination to use fully qualified names (ala, 7 // TODO: Restructure the name determination to use fully qualified names (ala,
8 // blink::Foo) so that the plugin can be enabled for all of chromium. Doing so 8 // blink::Foo) so that the plugin can be enabled for all of chromium. Doing so
9 // would allow us to catch errors with structures outside of blink that might 9 // would allow us to catch errors with structures outside of blink that might
10 // have unsafe pointers to GC allocated blink structures. 10 // have unsafe pointers to GC allocated blink structures.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 static bool IsTraceMethod(const clang::FunctionDecl* method) { 248 static bool IsTraceMethod(const clang::FunctionDecl* method) {
249 return GetTraceMethodType(method) != NOT_TRACE_METHOD; 249 return GetTraceMethodType(method) != NOT_TRACE_METHOD;
250 } 250 }
251 251
252 static bool IsTraceImplName(const std::string& name) { 252 static bool IsTraceImplName(const std::string& name) {
253 return name == kTraceImplName || name == kTraceAfterDispatchImplName; 253 return name == kTraceImplName || name == kTraceAfterDispatchImplName;
254 } 254 }
255 255
256 static bool StartsWith(const std::string& str, const std::string& prefix) { 256 static bool base::StartsWith(const std::string& str,
257 const std::string& prefix) {
257 if (prefix.size() > str.size()) 258 if (prefix.size() > str.size())
258 return false; 259 return false;
259 return str.compare(0, prefix.size(), prefix) == 0; 260 return str.compare(0, prefix.size(), prefix) == 0;
260 } 261 }
261 262
262 static bool EndsWith(const std::string& str, const std::string& suffix) { 263 static bool EndsWith(const std::string& str, const std::string& suffix) {
263 if (suffix.size() > str.size()) 264 if (suffix.size() > str.size())
264 return false; 265 return false;
265 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; 266 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
266 } 267 }
267 }; 268 };
268 269
269 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ 270 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_
OLDNEW
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698