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

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 10837111: [Sync] Print out notification state explicitly in about:sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 4 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 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "net/base/network_change_notifier.h" 11 #include "net/base/network_change_notifier.h"
12 #include "sync/engine/all_status.h" 12 #include "sync/engine/all_status.h"
13 #include "sync/engine/net/server_connection_manager.h" 13 #include "sync/engine/net/server_connection_manager.h"
14 #include "sync/engine/sync_engine_event.h" 14 #include "sync/engine/sync_engine_event.h"
15 #include "sync/engine/throttled_data_type_tracker.h" 15 #include "sync/engine/throttled_data_type_tracker.h"
16 #include "sync/engine/traffic_recorder.h" 16 #include "sync/engine/traffic_recorder.h"
17 #include "sync/internal_api/change_reorder_buffer.h" 17 #include "sync/internal_api/change_reorder_buffer.h"
18 #include "sync/internal_api/debug_info_event_listener.h" 18 #include "sync/internal_api/debug_info_event_listener.h"
19 #include "sync/internal_api/js_mutation_event_observer.h" 19 #include "sync/internal_api/js_mutation_event_observer.h"
20 #include "sync/internal_api/js_sync_manager_observer.h" 20 #include "sync/internal_api/js_sync_manager_observer.h"
21 #include "sync/internal_api/public/sync_manager.h" 21 #include "sync/internal_api/public/sync_manager.h"
22 #include "sync/js/js_backend.h" 22 #include "sync/js/js_backend.h"
23 #include "sync/notifier/notifications_disabled_reason.h"
23 #include "sync/notifier/sync_notifier_observer.h" 24 #include "sync/notifier/sync_notifier_observer.h"
24 #include "sync/syncable/directory_change_delegate.h" 25 #include "sync/syncable/directory_change_delegate.h"
25 #include "sync/util/cryptographer.h" 26 #include "sync/util/cryptographer.h"
26 #include "sync/util/time.h" 27 #include "sync/util/time.h"
27 28
28 namespace syncer { 29 namespace syncer {
29 30
30 class SyncAPIServerConnectionManager; 31 class SyncAPIServerConnectionManager;
31 class WriteNode; 32 class WriteNode;
32 class WriteTransaction; 33 class WriteTransaction;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void UpdateNotificationInfo( 291 void UpdateNotificationInfo(
291 const ModelTypePayloadMap& type_payloads); 292 const ModelTypePayloadMap& type_payloads);
292 293
293 // Checks for server reachabilty and requests a nudge. 294 // Checks for server reachabilty and requests a nudge.
294 void OnIPAddressChangedImpl(); 295 void OnIPAddressChangedImpl();
295 296
296 // Helper function used only by the constructor. 297 // Helper function used only by the constructor.
297 void BindJsMessageHandler( 298 void BindJsMessageHandler(
298 const std::string& name, UnboundJsMessageHandler unbound_message_handler); 299 const std::string& name, UnboundJsMessageHandler unbound_message_handler);
299 300
301 // Helper function used by OnNotifications{Enabled,Disabled}().
302 void OnNotificationStateChange(NotificationsDisabledReason reason);
303
300 // Returned pointer is owned by the caller. 304 // Returned pointer is owned by the caller.
301 static DictionaryValue* NotificationInfoToValue( 305 static DictionaryValue* NotificationInfoToValue(
302 const NotificationInfoMap& notification_info); 306 const NotificationInfoMap& notification_info);
303 307
308 static std::string NotificationInfoToString(
309 const NotificationInfoMap& notification_info);
310
304 // JS message handlers. 311 // JS message handlers.
305 JsArgList GetNotificationState(const JsArgList& args); 312 JsArgList GetNotificationState(const JsArgList& args);
306 JsArgList GetNotificationInfo(const JsArgList& args); 313 JsArgList GetNotificationInfo(const JsArgList& args);
307 JsArgList GetRootNodeDetails(const JsArgList& args); 314 JsArgList GetRootNodeDetails(const JsArgList& args);
308 JsArgList GetAllNodes(const JsArgList& args); 315 JsArgList GetAllNodes(const JsArgList& args);
309 JsArgList GetNodeSummariesById(const JsArgList& args); 316 JsArgList GetNodeSummariesById(const JsArgList& args);
310 JsArgList GetNodeDetailsById(const JsArgList& args); 317 JsArgList GetNodeDetailsById(const JsArgList& args);
311 JsArgList GetChildNodeIds(const JsArgList& args); 318 JsArgList GetChildNodeIds(const JsArgList& args);
312 JsArgList GetClientServerTraffic(const JsArgList& args); 319 JsArgList GetClientServerTraffic(const JsArgList& args);
313 320
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // TRANSACTION_COMPLETE step by HandleTransactionCompleteChangeEvent. 380 // TRANSACTION_COMPLETE step by HandleTransactionCompleteChangeEvent.
374 ChangeReorderBuffer change_buffers_[MODEL_TYPE_COUNT]; 381 ChangeReorderBuffer change_buffers_[MODEL_TYPE_COUNT];
375 382
376 SyncManager::ChangeDelegate* change_delegate_; 383 SyncManager::ChangeDelegate* change_delegate_;
377 384
378 // Set to true once Init has been called. 385 // Set to true once Init has been called.
379 bool initialized_; 386 bool initialized_;
380 387
381 bool observing_ip_address_changes_; 388 bool observing_ip_address_changes_;
382 389
390 NotificationsDisabledReason notifications_disabled_reason_;
391
383 // Map used to store the notification info to be displayed in 392 // Map used to store the notification info to be displayed in
384 // about:sync page. 393 // about:sync page.
385 NotificationInfoMap notification_info_map_; 394 NotificationInfoMap notification_info_map_;
386 395
387 // These are for interacting with chrome://sync-internals. 396 // These are for interacting with chrome://sync-internals.
388 JsMessageHandlerMap js_message_handlers_; 397 JsMessageHandlerMap js_message_handlers_;
389 WeakHandle<JsEventHandler> js_event_handler_; 398 WeakHandle<JsEventHandler> js_event_handler_;
390 JsSyncManagerObserver js_sync_manager_observer_; 399 JsSyncManagerObserver js_sync_manager_observer_;
391 JsMutationEventObserver js_mutation_event_observer_; 400 JsMutationEventObserver js_mutation_event_observer_;
392 401
(...skipping 12 matching lines...) Expand all
405 // conflict resolver) updated the nigori's encryption keys in this chrome 414 // conflict resolver) updated the nigori's encryption keys in this chrome
406 // instantiation. 415 // instantiation.
407 int nigori_overwrite_count_; 416 int nigori_overwrite_count_;
408 417
409 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 418 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
410 }; 419 };
411 420
412 } // namespace syncer 421 } // namespace syncer
413 422
414 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 423 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698