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

Side by Side Diff: chrome/browser/sync/tools/sync_listen_notifications.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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 | « chrome/browser/sync/test_profile_sync_service.cc ('k') | chrome/browser/sync/util/DEPS » ('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 <cstdio> 5 #include <cstdio>
6 #include <string> 6 #include <string>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/threading/thread.h" 17 #include "base/threading/thread.h"
18 #include "chrome/browser/sync/notifier/invalidation_version_tracker.h" 18 #include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
19 #include "chrome/browser/sync/notifier/sync_notifier.h" 19 #include "chrome/browser/sync/notifier/sync_notifier.h"
20 #include "chrome/browser/sync/notifier/sync_notifier_factory.h" 20 #include "chrome/browser/sync/notifier/sync_notifier_factory.h"
21 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" 21 #include "chrome/browser/sync/notifier/sync_notifier_observer.h"
22 #include "chrome/browser/sync/syncable/model_type.h"
23 #include "chrome/browser/sync/syncable/model_type_payload_map.h"
24 #include "jingle/notifier/base/notification_method.h" 22 #include "jingle/notifier/base/notification_method.h"
25 #include "jingle/notifier/base/notifier_options.h" 23 #include "jingle/notifier/base/notifier_options.h"
26 #include "net/base/host_port_pair.h" 24 #include "net/base/host_port_pair.h"
27 #include "net/url_request/url_request_test_util.h" 25 #include "net/url_request/url_request_test_util.h"
26 #include "sync/syncable/model_type.h"
27 #include "sync/syncable/model_type_payload_map.h"
28 28
29 // This is a simple utility that initializes a sync notifier and 29 // This is a simple utility that initializes a sync notifier and
30 // listens to any received notifications. 30 // listens to any received notifications.
31 31
32 namespace { 32 namespace {
33 33
34 // Class to print received notifications events. 34 // Class to print received notifications events.
35 class NotificationPrinter : public sync_notifier::SyncNotifierObserver { 35 class NotificationPrinter : public sync_notifier::SyncNotifierObserver {
36 public: 36 public:
37 NotificationPrinter() {} 37 NotificationPrinter() {}
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 sync_notifier->UpdateCredentials(email, token); 186 sync_notifier->UpdateCredentials(email, token);
187 // Listen for notifications for all known types. 187 // Listen for notifications for all known types.
188 sync_notifier->UpdateEnabledTypes(syncable::ModelTypeSet::All()); 188 sync_notifier->UpdateEnabledTypes(syncable::ModelTypeSet::All());
189 189
190 ui_loop.Run(); 190 ui_loop.Run();
191 191
192 sync_notifier->RemoveObserver(&notification_printer); 192 sync_notifier->RemoveObserver(&notification_printer);
193 io_thread.Stop(); 193 io_thread.Stop();
194 return 0; 194 return 0;
195 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | chrome/browser/sync/util/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698