OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/syncer.h" | 5 #include "chrome/browser/sync/engine/syncer.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // intended for the next session into the current one. We could do a | 138 // intended for the next session into the current one. We could do a |
139 // test-and-reset as with the source, but note that also falls short if | 139 // test-and-reset as with the source, but note that also falls short if |
140 // the commit request fails (e.g. due to lost connection), as we will | 140 // the commit request fails (e.g. due to lost connection), as we will |
141 // fall all the way back to the syncer thread main loop in that case, | 141 // fall all the way back to the syncer thread main loop in that case, |
142 // creating a new session when a connection is established, losing the | 142 // creating a new session when a connection is established, losing the |
143 // records set here on the original attempt. This should provide us | 143 // records set here on the original attempt. This should provide us |
144 // with the right data "most of the time", and we're only using this | 144 // with the right data "most of the time", and we're only using this |
145 // for analysis purposes, so Law of Large Numbers FTW. | 145 // for analysis purposes, so Law of Large Numbers FTW. |
146 session->context()->extensions_monitor()->GetAndClearRecords( | 146 session->context()->extensions_monitor()->GetAndClearRecords( |
147 session->mutable_extensions_activity()); | 147 session->mutable_extensions_activity()); |
| 148 session->context()->PruneUnthrottledTypes(base::TimeTicks::Now()); |
148 next_step = CLEANUP_DISABLED_TYPES; | 149 next_step = CLEANUP_DISABLED_TYPES; |
149 break; | 150 break; |
150 case CLEANUP_DISABLED_TYPES: { | 151 case CLEANUP_DISABLED_TYPES: { |
151 CleanupDisabledTypesCommand cleanup; | 152 CleanupDisabledTypesCommand cleanup; |
152 cleanup.Execute(session); | 153 cleanup.Execute(session); |
153 next_step = DOWNLOAD_UPDATES; | 154 next_step = DOWNLOAD_UPDATES; |
154 break; | 155 break; |
155 } | 156 } |
156 case DOWNLOAD_UPDATES: { | 157 case DOWNLOAD_UPDATES: { |
157 DownloadUpdatesCommand download_updates; | 158 DownloadUpdatesCommand download_updates; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 entry->Put(SERVER_CTIME, Time()); | 368 entry->Put(SERVER_CTIME, Time()); |
368 entry->Put(SERVER_VERSION, 0); | 369 entry->Put(SERVER_VERSION, 0); |
369 entry->Put(SERVER_IS_DIR, false); | 370 entry->Put(SERVER_IS_DIR, false); |
370 entry->Put(SERVER_IS_DEL, false); | 371 entry->Put(SERVER_IS_DEL, false); |
371 entry->Put(IS_UNAPPLIED_UPDATE, false); | 372 entry->Put(IS_UNAPPLIED_UPDATE, false); |
372 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); | 373 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); |
373 entry->Put(SERVER_POSITION_IN_PARENT, 0); | 374 entry->Put(SERVER_POSITION_IN_PARENT, 0); |
374 } | 375 } |
375 | 376 |
376 } // namespace browser_sync | 377 } // namespace browser_sync |
OLD | NEW |