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/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <bitset> | 8 #include <bitset> |
9 #include <iomanip> | 9 #include <iomanip> |
10 #include <list> | 10 #include <list> |
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2561 switch (type) { | 2561 switch (type) { |
2562 case syncable::PREFERENCES: | 2562 case syncable::PREFERENCES: |
2563 nudge_delay = | 2563 nudge_delay = |
2564 TimeDelta::FromMilliseconds(kPreferencesNudgeDelayMilliseconds); | 2564 TimeDelta::FromMilliseconds(kPreferencesNudgeDelayMilliseconds); |
2565 break; | 2565 break; |
2566 case syncable::SESSIONS: | 2566 case syncable::SESSIONS: |
2567 nudge_delay = scheduler()->sessions_commit_delay(); | 2567 nudge_delay = scheduler()->sessions_commit_delay(); |
2568 break; | 2568 break; |
2569 default: | 2569 default: |
2570 nudge_delay = | 2570 nudge_delay = |
2571 TimeDelta::FromMilliseconds(kPreferencesNudgeDelayMilliseconds); | 2571 TimeDelta::FromMilliseconds(kDefaultNudgeDelayMilliseconds); |
2572 break; | 2572 break; |
2573 } | 2573 } |
2574 syncable::ModelTypeBitSet types; | 2574 syncable::ModelTypeBitSet types; |
2575 types.set(type); | 2575 types.set(type); |
2576 scheduler()->ScheduleNudge(nudge_delay, | 2576 scheduler()->ScheduleNudge(nudge_delay, |
2577 browser_sync::NUDGE_SOURCE_LOCAL, | 2577 browser_sync::NUDGE_SOURCE_LOCAL, |
2578 types, | 2578 types, |
2579 nudge_location); | 2579 nudge_location); |
2580 } | 2580 } |
2581 | 2581 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3075 void SyncManager::TriggerOnIncomingNotificationForTest( | 3075 void SyncManager::TriggerOnIncomingNotificationForTest( |
3076 const syncable::ModelTypeBitSet& model_types) { | 3076 const syncable::ModelTypeBitSet& model_types) { |
3077 syncable::ModelTypePayloadMap model_types_with_payloads = | 3077 syncable::ModelTypePayloadMap model_types_with_payloads = |
3078 syncable::ModelTypePayloadMapFromBitSet(model_types, | 3078 syncable::ModelTypePayloadMapFromBitSet(model_types, |
3079 std::string()); | 3079 std::string()); |
3080 | 3080 |
3081 data_->OnIncomingNotification(model_types_with_payloads); | 3081 data_->OnIncomingNotification(model_types_with_payloads); |
3082 } | 3082 } |
3083 | 3083 |
3084 } // namespace sync_api | 3084 } // namespace sync_api |
OLD | NEW |