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

Side by Side Diff: chrome/browser/sync/engine/sync_scheduler.h

Issue 8787006: Delay autofill commits to reduce client to server traffic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years 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
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 // A class to schedule syncer tasks intelligently. 5 // A class to schedule syncer tasks intelligently.
6 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ 6 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_
7 #define CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ 7 #define CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_
8 #pragma once 8 #pragma once
9 9
10 #include <string> 10 #include <string>
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // the task in between calls to Start/Stop. 248 // the task in between calls to Start/Stop.
249 void PostTask(const tracked_objects::Location& from_here, 249 void PostTask(const tracked_objects::Location& from_here,
250 const char* name, 250 const char* name,
251 const base::Closure& task); 251 const base::Closure& task);
252 void PostDelayedTask(const tracked_objects::Location& from_here, 252 void PostDelayedTask(const tracked_objects::Location& from_here,
253 const char* name, 253 const char* name,
254 const base::Closure& task, 254 const base::Closure& task,
255 int64 delay_ms); 255 int64 delay_ms);
256 256
257 // Helper to assemble a job and post a delayed task to sync. 257 // Helper to assemble a job and post a delayed task to sync.
258 void ScheduleSyncSessionJob( 258 void ScheduleSyncSessionJob(const SyncSessionJob& job);
259 const base::TimeDelta& delay,
260 SyncSessionJob::SyncSessionJobPurpose purpose,
261 sessions::SyncSession* session,
262 const tracked_objects::Location& from_here);
263 259
264 // Invoke the Syncer to perform a sync. 260 // Invoke the Syncer to perform a sync.
265 void DoSyncSessionJob(const SyncSessionJob& job); 261 void DoSyncSessionJob(const SyncSessionJob& job);
266 262
267 // Called after the Syncer has performed the sync represented by |job|, to 263 // Called after the Syncer has performed the sync represented by |job|, to
268 // reset our state. 264 // reset our state.
269 void FinishSyncSessionJob(const SyncSessionJob& job); 265 void FinishSyncSessionJob(const SyncSessionJob& job);
270 266
271 // Record important state that might be needed in future syncs, such as which 267 // Record important state that might be needed in future syncs, such as which
272 // data types may require cleanup. 268 // data types may require cleanup.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 scoped_ptr<Syncer> syncer_; 406 scoped_ptr<Syncer> syncer_;
411 407
412 scoped_ptr<sessions::SyncSessionContext> session_context_; 408 scoped_ptr<sessions::SyncSessionContext> session_context_;
413 409
414 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); 410 DISALLOW_COPY_AND_ASSIGN(SyncScheduler);
415 }; 411 };
416 412
417 } // namespace browser_sync 413 } // namespace browser_sync
418 414
419 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ 415 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/sync_scheduler.cc » ('j') | chrome/browser/sync/engine/sync_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698