OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync_driver/model_association_manager.h" | 5 #include "components/sync_driver/model_association_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
15 | 15 |
16 using syncer::ModelTypeSet; | 16 using syncer::ModelTypeSet; |
17 | 17 |
18 namespace browser_sync { | 18 namespace sync_driver { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 static const syncer::ModelType kStartOrder[] = { | 22 static const syncer::ModelType kStartOrder[] = { |
23 syncer::NIGORI, // Listed for completeness. | 23 syncer::NIGORI, // Listed for completeness. |
24 syncer::DEVICE_INFO, // Listed for completeness. | 24 syncer::DEVICE_INFO, // Listed for completeness. |
25 syncer::EXPERIMENTS, // Listed for completeness. | 25 syncer::EXPERIMENTS, // Listed for completeness. |
26 syncer::PROXY_TABS, // Listed for completeness. | 26 syncer::PROXY_TABS, // Listed for completeness. |
27 | 27 |
28 // Kick off the association of the non-UI types first so they can associate | 28 // Kick off the association of the non-UI types first so they can associate |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 state_ = IDLE; | 454 state_ = IDLE; |
455 | 455 |
456 delegate_->OnModelAssociationDone(result); | 456 delegate_->OnModelAssociationDone(result); |
457 } | 457 } |
458 | 458 |
459 base::OneShotTimer<ModelAssociationManager>* | 459 base::OneShotTimer<ModelAssociationManager>* |
460 ModelAssociationManager::GetTimerForTesting() { | 460 ModelAssociationManager::GetTimerForTesting() { |
461 return &timer_; | 461 return &timer_; |
462 } | 462 } |
463 | 463 |
464 } // namespace browser_sync | 464 } // namespace sync_driver |
OLD | NEW |