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

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

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 8 years, 6 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 "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/task_runner.h" 15 #include "base/task_runner.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "sync/internal_api/change_record.h" 18 #include "sync/internal_api/change_record.h"
19 #include "sync/internal_api/configure_reason.h" 19 #include "sync/internal_api/configure_reason.h"
20 #include "sync/internal_api/public/engine/model_safe_worker.h" 20 #include "sync/internal_api/public/engine/model_safe_worker.h"
21 #include "sync/internal_api/public/syncable/model_type.h" 21 #include "sync/internal_api/public/syncable/model_type.h"
22 #include "sync/notifier/sync_notifier_state.h"
22 #include "sync/protocol/sync_protocol_error.h" 23 #include "sync/protocol/sync_protocol_error.h"
23 #include "sync/util/report_unrecoverable_error_function.h" 24 #include "sync/util/report_unrecoverable_error_function.h"
24 #include "sync/util/unrecoverable_error_handler.h" 25 #include "sync/util/unrecoverable_error_handler.h"
25 #include "sync/util/weak_handle.h" 26 #include "sync/util/weak_handle.h"
26 27
27 namespace browser_sync { 28 namespace browser_sync {
28 class Encryptor; 29 class Encryptor;
29 struct Experiments; 30 struct Experiments;
30 class ExtensionsActivityMonitor; 31 class ExtensionsActivityMonitor;
31 class JsBackend; 32 class JsBackend;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 public: 89 public:
89 // SyncInternal contains the implementation of SyncManager, while abstracting 90 // SyncInternal contains the implementation of SyncManager, while abstracting
90 // internal types from clients of the interface. 91 // internal types from clients of the interface.
91 class SyncInternal; 92 class SyncInternal;
92 93
93 // Status encapsulates detailed state about the internals of the SyncManager. 94 // Status encapsulates detailed state about the internals of the SyncManager.
94 struct Status { 95 struct Status {
95 Status(); 96 Status();
96 ~Status(); 97 ~Status();
97 98
99 // TODO(akalin): Change this to a SyncNotifierState.
98 bool notifications_enabled; // True only if subscribed for notifications. 100 bool notifications_enabled; // True only if subscribed for notifications.
99 101
100 // Notifications counters updated by the actions in synapi. 102 // Notifications counters updated by the actions in synapi.
101 int notifications_received; 103 int notifications_received;
102 104
103 browser_sync::SyncProtocolError sync_protocol_error; 105 browser_sync::SyncProtocolError sync_protocol_error;
104 106
105 // Number of encryption conflicts counted during most recent sync cycle. 107 // Number of encryption conflicts counted during most recent sync cycle.
106 int encryption_conflicts; 108 int encryption_conflicts;
107 109
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // be enabled. 593 // be enabled.
592 // Note: opens a transaction. May be called on any thread. 594 // Note: opens a transaction. May be called on any thread.
593 bool ReceivedExperiment(browser_sync::Experiments* experiments) const; 595 bool ReceivedExperiment(browser_sync::Experiments* experiments) const;
594 596
595 // Uses a read-only transaction to determine if the directory being synced has 597 // Uses a read-only transaction to determine if the directory being synced has
596 // any remaining unsynced items. May be called on any thread. 598 // any remaining unsynced items. May be called on any thread.
597 bool HasUnsyncedItems() const; 599 bool HasUnsyncedItems() const;
598 600
599 // Functions used for testing. 601 // Functions used for testing.
600 602
601 void TriggerOnNotificationStateChangeForTest( 603 void TriggerOnSyncNotifierStateChangeForTest(
602 bool notifications_enabled); 604 sync_notifier::SyncNotifierState sync_notifier_state);
603 605
604 void TriggerOnIncomingNotificationForTest( 606 void TriggerOnIncomingNotificationForTest(
605 syncable::ModelTypeSet model_types); 607 syncable::ModelTypeSet model_types);
606 608
607 static const int kDefaultNudgeDelayMilliseconds; 609 static const int kDefaultNudgeDelayMilliseconds;
608 static const int kPreferencesNudgeDelayMilliseconds; 610 static const int kPreferencesNudgeDelayMilliseconds;
609 static const int kPiggybackNudgeDelay; 611 static const int kPiggybackNudgeDelay;
610 612
611 static const FilePath::CharType kSyncDatabaseFilename[]; 613 static const FilePath::CharType kSyncDatabaseFilename[];
612 614
(...skipping 18 matching lines...) Expand all
631 sync_api::UserShare* share); 633 sync_api::UserShare* share);
632 634
633 const char* ConnectionStatusToString(ConnectionStatus status); 635 const char* ConnectionStatusToString(ConnectionStatus status);
634 636
635 // Returns the string representation of a PassphraseRequiredReason value. 637 // Returns the string representation of a PassphraseRequiredReason value.
636 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); 638 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason);
637 639
638 } // namespace sync_api 640 } // namespace sync_api
639 641
640 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 642 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698