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

Side by Side Diff: sync/notifier/sync_invalidation_listener_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh 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 | « sync/notifier/push_client_channel_unittest.cc ('k') | sync/notifier/sync_system_resources.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 <cstddef> 5 #include <cstddef>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 state_(TRANSIENT_INVALIDATION_ERROR) {} 141 state_(TRANSIENT_INVALIDATION_ERROR) {}
142 virtual ~FakeDelegate() {} 142 virtual ~FakeDelegate() {}
143 143
144 int GetInvalidationCount(const ObjectId& id) const { 144 int GetInvalidationCount(const ObjectId& id) const {
145 ObjectIdCountMap::const_iterator it = invalidation_counts_.find(id); 145 ObjectIdCountMap::const_iterator it = invalidation_counts_.find(id);
146 return (it == invalidation_counts_.end()) ? 0 : it->second; 146 return (it == invalidation_counts_.end()) ? 0 : it->second;
147 } 147 }
148 148
149 std::string GetPayload(const ObjectId& id) const { 149 std::string GetPayload(const ObjectId& id) const {
150 ObjectIdInvalidationMap::const_iterator it = invalidations_.find(id); 150 ObjectIdInvalidationMap::const_iterator it = invalidations_.find(id);
151 return (it == invalidations_.end()) ? "" : it->second.payload; 151 return (it == invalidations_.end()) ? std::string() : it->second.payload;
152 } 152 }
153 153
154 InvalidatorState GetInvalidatorState() const { 154 InvalidatorState GetInvalidatorState() const {
155 return state_; 155 return state_;
156 } 156 }
157 157
158 void Acknowledge(const ObjectId& id) { 158 void Acknowledge(const ObjectId& id) {
159 listener_->Acknowledge(id, invalidations_[id].ack_handle); 159 listener_->Acknowledge(id, invalidations_[id].ack_handle);
160 } 160 }
161 161
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 EXPECT_EQ(INVALIDATION_CREDENTIALS_REJECTED, GetInvalidatorState()); 955 EXPECT_EQ(INVALIDATION_CREDENTIALS_REJECTED, GetInvalidatorState());
956 956
957 listener_.Ready(fake_invalidation_client_); 957 listener_.Ready(fake_invalidation_client_);
958 958
959 EXPECT_EQ(INVALIDATIONS_ENABLED, GetInvalidatorState()); 959 EXPECT_EQ(INVALIDATIONS_ENABLED, GetInvalidatorState());
960 } 960 }
961 961
962 } // namespace 962 } // namespace
963 963
964 } // namespace syncer 964 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/push_client_channel_unittest.cc ('k') | sync/notifier/sync_system_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698