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

Side by Side Diff: dbus/object_path.cc

Issue 13942004: Adding PrintTo of ObjectPath for gtest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « dbus/object_path.h ('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 (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/object_path.h" 5 #include "dbus/object_path.h"
6 6
7 #include <ostream>
8
7 #include "dbus/string_util.h" 9 #include "dbus/string_util.h"
8 10
9 namespace dbus { 11 namespace dbus {
10 12
11 bool ObjectPath::IsValid() const { 13 bool ObjectPath::IsValid() const {
12 return IsValidObjectPath(value_); 14 return IsValidObjectPath(value_);
13 } 15 }
14 16
15 bool ObjectPath::operator<(const ObjectPath& that) const { 17 bool ObjectPath::operator<(const ObjectPath& that) const {
16 return value_ < that.value_; 18 return value_ < that.value_;
17 } 19 }
18 20
19 bool ObjectPath::operator==(const ObjectPath& that) const { 21 bool ObjectPath::operator==(const ObjectPath& that) const {
20 return value_ == that.value_; 22 return value_ == that.value_;
21 } 23 }
22 24
23 bool ObjectPath::operator!=(const ObjectPath& that) const { 25 bool ObjectPath::operator!=(const ObjectPath& that) const {
24 return value_ != that.value_; 26 return value_ != that.value_;
25 } 27 }
26 28
29 void PrintTo(const ObjectPath& path, std::ostream* out) {
30 *out << path.value();
31 }
32
27 } // namespace dbus 33 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/object_path.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698