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

Side by Side Diff: chrome/browser/sync/engine/syncapi.cc

Issue 7622015: [Sync] Fix bug where the preferences commit delay is used for everything (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « no previous file | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698