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

Unified Diff: chrome/browser/sync/sessions/sync_session_context.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sessions/sync_session_context.cc
diff --git a/chrome/browser/sync/sessions/sync_session_context.cc b/chrome/browser/sync/sessions/sync_session_context.cc
deleted file mode 100644
index 21ca1c5d6df25226feb669f03c0df1290c4e3d73..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/sessions/sync_session_context.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-
-#include "chrome/browser/sync/sessions/debug_info_getter.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
-
-namespace browser_sync {
-namespace sessions {
-
-SyncSessionContext::SyncSessionContext(
- ServerConnectionManager* connection_manager,
- syncable::Directory* directory,
- ModelSafeWorkerRegistrar* model_safe_worker_registrar,
- ExtensionsActivityMonitor* extensions_activity_monitor,
- const std::vector<SyncEngineEventListener*>& listeners,
- DebugInfoGetter* debug_info_getter)
- : resolver_(NULL),
- connection_manager_(connection_manager),
- directory_(directory),
- registrar_(model_safe_worker_registrar),
- extensions_activity_monitor_(extensions_activity_monitor),
- notifications_enabled_(false),
- max_commit_batch_size_(kDefaultMaxCommitBatchSize),
- debug_info_getter_(debug_info_getter) {
- std::vector<SyncEngineEventListener*>::const_iterator it;
- for (it = listeners.begin(); it != listeners.end(); ++it)
- listeners_.AddObserver(*it);
-}
-
-SyncSessionContext::SyncSessionContext()
- : connection_manager_(NULL),
- directory_(NULL),
- registrar_(NULL),
- extensions_activity_monitor_(NULL),
- debug_info_getter_(NULL) {
-}
-
-SyncSessionContext::~SyncSessionContext() {
-}
-
-void SyncSessionContext::SetUnthrottleTime(syncable::ModelTypeSet types,
- const base::TimeTicks& time) {
- for (syncable::ModelTypeSet::Iterator it = types.First();
- it.Good(); it.Inc()) {
- unthrottle_times_[it.Get()] = time;
- }
-}
-
-void SyncSessionContext::PruneUnthrottledTypes(const base::TimeTicks& time) {
- UnthrottleTimes::iterator it = unthrottle_times_.begin();
- while (it != unthrottle_times_.end()) {
- if (it->second <= time) {
- // Delete and increment the iterator.
- UnthrottleTimes::iterator iterator_to_delete = it;
- ++it;
- unthrottle_times_.erase(iterator_to_delete);
- } else {
- // Just increment the iterator.
- ++it;
- }
- }
-}
-
-// TODO(lipalani): Call this function and fill the return values in snapshot
-// so it could be shown in the about:sync page.
-syncable::ModelTypeSet SyncSessionContext::GetThrottledTypes() const {
- syncable::ModelTypeSet types;
- for (UnthrottleTimes::const_iterator it = unthrottle_times_.begin();
- it != unthrottle_times_.end();
- ++it) {
- types.Put(it->first);
- }
- return types;
-}
-
-} // namespace sessions
-} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_context.h ('k') | chrome/browser/sync/sessions/sync_session_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698