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

Side by Side Diff: sync/engine/sync_scheduler.cc

Issue 10690071: [Sync] Move model_type* from syncable/ to base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « sync/engine/sync_scheduler.h ('k') | sync/engine/syncer.h » ('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 "sync/engine/sync_scheduler.h" 5 #include "sync/engine/sync_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 ModelSafeRoutingInfo routes; 597 ModelSafeRoutingInfo routes;
598 std::vector<ModelSafeWorker*> workers; 598 std::vector<ModelSafeWorker*> workers;
599 GetModelSafeParamsForTypes(types, 599 GetModelSafeParamsForTypes(types,
600 session_context_->routing_info(), 600 session_context_->routing_info(),
601 session_context_->workers(), 601 session_context_->workers(),
602 &routes, &workers); 602 &routes, &workers);
603 603
604 SyncSession* session = new SyncSession(session_context_, this, 604 SyncSession* session = new SyncSession(session_context_, this,
605 SyncSourceInfo(source, 605 SyncSourceInfo(source,
606 syncable::ModelTypePayloadMapFromRoutingInfo( 606 ModelSafeRoutingInfoToPayloadMap(routes, std::string())),
607 routes, std::string())),
608 routes, workers); 607 routes, workers);
609 SyncSessionJob job(SyncSessionJob::CONFIGURATION, TimeTicks::Now(), 608 SyncSessionJob job(SyncSessionJob::CONFIGURATION, TimeTicks::Now(),
610 make_linked_ptr(session), 609 make_linked_ptr(session),
611 false, 610 false,
612 FROM_HERE); 611 FROM_HERE);
613 DoSyncSessionJob(job); 612 DoSyncSessionJob(job);
614 } 613 }
615 614
616 const char* SyncScheduler::GetModeString(SyncScheduler::Mode mode) { 615 const char* SyncScheduler::GetModeString(SyncScheduler::Mode mode) {
617 switch (mode) { 616 switch (mode) {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 SyncSession* session(new SyncSession(session_context_, this, info, 1024 SyncSession* session(new SyncSession(session_context_, this, info,
1026 session_context_->routing_info(), session_context_->workers())); 1025 session_context_->routing_info(), session_context_->workers()));
1027 1026
1028 return session; 1027 return session;
1029 } 1028 }
1030 1029
1031 void SyncScheduler::PollTimerCallback() { 1030 void SyncScheduler::PollTimerCallback() {
1032 DCHECK_EQ(MessageLoop::current(), sync_loop_); 1031 DCHECK_EQ(MessageLoop::current(), sync_loop_);
1033 ModelSafeRoutingInfo r; 1032 ModelSafeRoutingInfo r;
1034 ModelTypePayloadMap types_with_payloads = 1033 ModelTypePayloadMap types_with_payloads =
1035 syncable::ModelTypePayloadMapFromRoutingInfo(r, std::string()); 1034 ModelSafeRoutingInfoToPayloadMap(r, std::string());
1036 SyncSourceInfo info(GetUpdatesCallerInfo::PERIODIC, types_with_payloads); 1035 SyncSourceInfo info(GetUpdatesCallerInfo::PERIODIC, types_with_payloads);
1037 SyncSession* s = CreateSyncSession(info); 1036 SyncSession* s = CreateSyncSession(info);
1038 1037
1039 SyncSessionJob job(SyncSessionJob::POLL, TimeTicks::Now(), 1038 SyncSessionJob job(SyncSessionJob::POLL, TimeTicks::Now(),
1040 make_linked_ptr(s), 1039 make_linked_ptr(s),
1041 false, 1040 false,
1042 FROM_HERE); 1041 FROM_HERE);
1043 1042
1044 ScheduleSyncSessionJob(job); 1043 ScheduleSyncSessionJob(job);
1045 } 1044 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 1134
1136 #undef SDVLOG_LOC 1135 #undef SDVLOG_LOC
1137 1136
1138 #undef SDVLOG 1137 #undef SDVLOG
1139 1138
1140 #undef SLOG 1139 #undef SLOG
1141 1140
1142 #undef ENUM_CASE 1141 #undef ENUM_CASE
1143 1142
1144 } // namespace syncer 1143 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler.h ('k') | sync/engine/syncer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698