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

Side by Side Diff: jingle/notifier/listener/notification_defines.cc

Issue 16684003: Use a direct include of strings headers in ipc/, jingle/, media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 "jingle/notifier/listener/notification_defines.h" 5 #include "jingle/notifier/listener/notification_defines.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/json/string_escape.h" 9 #include "base/json/string_escape.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 13
14 namespace notifier { 14 namespace notifier {
15 15
16 Subscription::Subscription() {} 16 Subscription::Subscription() {}
17 Subscription::~Subscription() {} 17 Subscription::~Subscription() {}
18 18
19 bool Subscription::Equals(const Subscription& other) const { 19 bool Subscription::Equals(const Subscription& other) const {
20 return channel == other.channel && from == other.from; 20 return channel == other.channel && from == other.from;
21 } 21 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 std::string Notification::ToString() const { 67 std::string Notification::ToString() const {
68 // |channel| or |data| could hold binary data, so use GetDoubleQuotedJson() 68 // |channel| or |data| could hold binary data, so use GetDoubleQuotedJson()
69 // to escape them. 69 // to escape them.
70 const std::string& printable_channel = base::GetDoubleQuotedJson(channel); 70 const std::string& printable_channel = base::GetDoubleQuotedJson(channel);
71 const std::string& printable_data = base::GetDoubleQuotedJson(data); 71 const std::string& printable_data = base::GetDoubleQuotedJson(data);
72 return 72 return
73 "{ channel: " + printable_channel + ", data: " + printable_data + " }"; 73 "{ channel: " + printable_channel + ", data: " + printable_data + " }";
74 } 74 }
75 75
76 } // namespace notifier 76 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/communicator/single_login_attempt.cc ('k') | jingle/notifier/listener/notification_defines_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698