| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/sync/engine/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include <bitset> | 9 #include <bitset> |
| 10 #include <iomanip> | 10 #include <iomanip> |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 | 899 |
| 900 virtual int GetBackoffDelaySeconds(int current_backoff_delay) { | 900 virtual int GetBackoffDelaySeconds(int current_backoff_delay) { |
| 901 return SyncerThread::GetRecommendedDelaySeconds(current_backoff_delay); | 901 return SyncerThread::GetRecommendedDelaySeconds(current_backoff_delay); |
| 902 } | 902 } |
| 903 private: | 903 private: |
| 904 const std::string gaia_source_; | 904 const std::string gaia_source_; |
| 905 scoped_ptr<HttpPostProviderFactory> post_factory_; | 905 scoped_ptr<HttpPostProviderFactory> post_factory_; |
| 906 DISALLOW_COPY_AND_ASSIGN(BridgedGaiaAuthenticator); | 906 DISALLOW_COPY_AND_ASSIGN(BridgedGaiaAuthenticator); |
| 907 }; | 907 }; |
| 908 | 908 |
| 909 SyncManager::ChangeRecord::ChangeRecord() |
| 910 : id(kInvalidId), action(ACTION_ADD) {} |
| 911 |
| 912 SyncManager::ChangeRecord::~ChangeRecord() {} |
| 913 |
| 914 SyncManager::ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( |
| 915 const sync_pb::PasswordSpecificsData& data) |
| 916 : unencrypted_(data) { |
| 917 } |
| 918 |
| 919 SyncManager::ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} |
| 920 |
| 909 ////////////////////////////////////////////////////////////////////////// | 921 ////////////////////////////////////////////////////////////////////////// |
| 910 // SyncManager's implementation: SyncManager::SyncInternal | 922 // SyncManager's implementation: SyncManager::SyncInternal |
| 911 class SyncManager::SyncInternal | 923 class SyncManager::SyncInternal |
| 912 : public net::NetworkChangeNotifier::Observer, | 924 : public net::NetworkChangeNotifier::Observer, |
| 913 public TalkMediator::Delegate, | 925 public TalkMediator::Delegate, |
| 914 public sync_notifier::StateWriter, | 926 public sync_notifier::StateWriter, |
| 915 public browser_sync::ChannelEventHandler<syncable::DirectoryChangeEvent>, | 927 public browser_sync::ChannelEventHandler<syncable::DirectoryChangeEvent>, |
| 916 public SyncEngineEventListener { | 928 public SyncEngineEventListener { |
| 917 static const int kDefaultNudgeDelayMilliseconds; | 929 static const int kDefaultNudgeDelayMilliseconds; |
| 918 static const int kPreferencesNudgeDelayMilliseconds; | 930 static const int kPreferencesNudgeDelayMilliseconds; |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 2101 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; |
| 2090 return data_->GetUserShare(); | 2102 return data_->GetUserShare(); |
| 2091 } | 2103 } |
| 2092 | 2104 |
| 2093 bool SyncManager::HasUnsyncedItems() const { | 2105 bool SyncManager::HasUnsyncedItems() const { |
| 2094 sync_api::ReadTransaction trans(GetUserShare()); | 2106 sync_api::ReadTransaction trans(GetUserShare()); |
| 2095 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); | 2107 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); |
| 2096 } | 2108 } |
| 2097 | 2109 |
| 2098 } // namespace sync_api | 2110 } // namespace sync_api |
| OLD | NEW |