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

Unified Diff: sync/notifier/p2p_invalidator.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 side-by-side diff with in-line comments
Download patch
Index: sync/notifier/p2p_invalidator.cc
diff --git a/sync/notifier/p2p_invalidator.cc b/sync/notifier/p2p_invalidator.cc
index dd9a34d071456ceeafc117a2a282ea68cec91330..78257575d8834f443d3947dda07ccf0d2cc541a9 100644
--- a/sync/notifier/p2p_invalidator.cc
+++ b/sync/notifier/p2p_invalidator.cc
@@ -40,7 +40,7 @@ std::string P2PNotificationTargetToString(P2PNotificationTarget target) {
return kNotifyAll;
default:
NOTREACHED();
- return "";
+ return std::string();
}
}
@@ -171,8 +171,9 @@ void P2PInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
ObjectIdLessThan());
registrar_.UpdateRegisteredIds(handler, ids);
const P2PNotificationData notification_data(
- invalidator_client_id_, NOTIFY_SELF,
- ObjectIdSetToInvalidationMap(new_ids, ""));
+ invalidator_client_id_,
+ NOTIFY_SELF,
+ ObjectIdSetToInvalidationMap(new_ids, std::string()));
SendNotificationData(notification_data);
}
@@ -224,8 +225,10 @@ void P2PInvalidator::OnNotificationsEnabled() {
registrar_.UpdateInvalidatorState(INVALIDATIONS_ENABLED);
if (just_turned_on) {
const P2PNotificationData notification_data(
- invalidator_client_id_, NOTIFY_SELF,
- ObjectIdSetToInvalidationMap(registrar_.GetAllRegisteredIds(), ""));
+ invalidator_client_id_,
+ NOTIFY_SELF,
+ ObjectIdSetToInvalidationMap(registrar_.GetAllRegisteredIds(),
+ std::string()));
SendNotificationData(notification_data);
}
}
@@ -256,10 +259,11 @@ void P2PInvalidator::OnIncomingNotification(
if (!notification_data.ResetFromString(notification.data)) {
LOG(WARNING) << "Could not parse notification data from "
<< notification.data;
- notification_data =
- P2PNotificationData(
- invalidator_client_id_, NOTIFY_ALL,
- ObjectIdSetToInvalidationMap(registrar_.GetAllRegisteredIds(), ""));
+ notification_data = P2PNotificationData(
+ invalidator_client_id_,
+ NOTIFY_ALL,
+ ObjectIdSetToInvalidationMap(registrar_.GetAllRegisteredIds(),
+ std::string()));
}
if (!notification_data.IsTargeted(invalidator_client_id_)) {
DVLOG(1) << "Not a target of the notification -- "
« no previous file with comments | « sync/internal_api/syncapi_server_connection_manager_unittest.cc ('k') | sync/notifier/p2p_invalidator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698