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

Unified Diff: components/sync/tools/sync_listen_notifications.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « components/sync/tools/sync_client.cc ('k') | components/sync/tools/sync_tools.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/tools/sync_listen_notifications.cc
diff --git a/sync/tools/sync_listen_notifications.cc b/components/sync/tools/sync_listen_notifications.cc
similarity index 87%
rename from sync/tools/sync_listen_notifications.cc
rename to components/sync/tools/sync_listen_notifications.cc
index ecb9b37a25032f6497b191631c20799deffb0d54..ab5ad57cbd041211ca6c82350198d7a4901efcd7 100644
--- a/sync/tools/sync_listen_notifications.cc
+++ b/components/sync/tools/sync_listen_notifications.cc
@@ -25,6 +25,8 @@
#include "components/invalidation/public/invalidation_handler.h"
#include "components/invalidation/public/invalidation_util.h"
#include "components/invalidation/public/object_id_invalidation_map.h"
+#include "components/sync/base/model_type.h"
+#include "components/sync/tools/null_invalidation_state_tracker.h"
#include "components/sync_driver/invalidation_helper.h"
#include "jingle/notifier/base/notification_method.h"
#include "jingle/notifier/base/notifier_options.h"
@@ -33,8 +35,6 @@
#include "net/dns/host_resolver.h"
#include "net/http/transport_security_state.h"
#include "net/url_request/url_request_test_util.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/tools/null_invalidation_state_tracker.h"
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -67,8 +67,7 @@ class NotificationPrinter : public InvalidationHandler {
const ObjectIdInvalidationMap& invalidation_map) override {
ObjectIdSet ids = invalidation_map.GetObjectIds();
for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
- LOG(INFO) << "Remote invalidation: "
- << invalidation_map.ToString();
+ LOG(INFO) << "Remote invalidation: " << invalidation_map.ToString();
}
}
@@ -119,9 +118,8 @@ notifier::NotifierOptions ParseNotifierOptions(
notifier_options.request_context_getter = request_context_getter;
if (command_line.HasSwitch(kHostPortSwitch)) {
- notifier_options.xmpp_host_port =
- net::HostPortPair::FromString(
- command_line.GetSwitchValueASCII(kHostPortSwitch));
+ notifier_options.xmpp_host_port = net::HostPortPair::FromString(
+ command_line.GetSwitchValueASCII(kHostPortSwitch));
LOG(INFO) << "Using " << notifier_options.xmpp_host_port.ToString()
<< " for test sync notification server.";
}
@@ -163,15 +161,15 @@ int SyncListenNotificationsMain(int argc, char* argv[]) {
// TODO(akalin): Write a wrapper script that gets a token for an
// email and password and passes that in to this utility.
if (email.empty() || token.empty()) {
- std::printf("Usage: %s --%s=foo@bar.com --%s=token\n"
- "[--%s=host:port] [--%s] [--%s]\n"
- "Run chrome and set a breakpoint on\n"
- "syncer::SyncManagerImpl::UpdateCredentials() "
- "after logging into\n"
- "sync to get the token to pass into this utility.\n",
- argv[0],
- kEmailSwitch, kTokenSwitch, kHostPortSwitch,
- kTrySslTcpFirstSwitch, kAllowInsecureConnectionSwitch);
+ std::printf(
+ "Usage: %s --%s=foo@bar.com --%s=token\n"
+ "[--%s=host:port] [--%s] [--%s]\n"
+ "Run chrome and set a breakpoint on\n"
+ "syncer::SyncManagerImpl::UpdateCredentials() "
+ "after logging into\n"
+ "sync to get the token to pass into this utility.\n",
+ argv[0], kEmailSwitch, kTokenSwitch, kHostPortSwitch,
+ kTrySslTcpFirstSwitch, kAllowInsecureConnectionSwitch);
return -1;
}
@@ -179,10 +177,8 @@ int SyncListenNotificationsMain(int argc, char* argv[]) {
std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier(
net::NetworkChangeNotifier::Create());
- const notifier::NotifierOptions& notifier_options =
- ParseNotifierOptions(
- command_line,
- new MyTestURLRequestContextGetter(io_thread.task_runner()));
+ const notifier::NotifierOptions& notifier_options = ParseNotifierOptions(
+ command_line, new MyTestURLRequestContextGetter(io_thread.task_runner()));
syncer::NetworkChannelCreator network_channel_creator =
syncer::NonBlockingInvalidator::MakePushClientChannelCreator(
notifier_options);
« no previous file with comments | « components/sync/tools/sync_client.cc ('k') | components/sync/tools/sync_tools.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698