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

Side by Side Diff: dbus/string_util.cc

Issue 1541193002: Switch to standard integer types in dbus/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « dbus/property_unittest.cc ('k') | dbus/test_service.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "dbus/string_util.h" 5 #include "dbus/string_util.h"
6 6
7 #include <stddef.h>
8
7 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
8 10
9 namespace dbus { 11 namespace dbus {
10 12
11 // This implementation is based upon D-Bus Specification Version 0.19. 13 // This implementation is based upon D-Bus Specification Version 0.19.
12 bool IsValidObjectPath(const std::string& value) { 14 bool IsValidObjectPath(const std::string& value) {
13 // A valid object path begins with '/'. 15 // A valid object path begins with '/'.
14 if (!base::StartsWith(value, "/", base::CompareCase::SENSITIVE)) 16 if (!base::StartsWith(value, "/", base::CompareCase::SENSITIVE))
15 return false; 17 return false;
16 18
(...skipping 20 matching lines...) Expand all
37 39
38 // A trailing '/' character is not allowed unless the path is the root path. 40 // A trailing '/' character is not allowed unless the path is the root path.
39 if (value.size() > 1 && 41 if (value.size() > 1 &&
40 base::EndsWith(value, "/", base::CompareCase::SENSITIVE)) 42 base::EndsWith(value, "/", base::CompareCase::SENSITIVE))
41 return false; 43 return false;
42 44
43 return true; 45 return true;
44 } 46 }
45 47
46 } // namespace dbus 48 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/property_unittest.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698