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

Side by Side Diff: chrome/browser/sync_file_system/sync_process_runner.h

Issue 378223002: [SyncFS] Make base::TimeTicks::Now() dependency in SyncProcessRunner injectable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | chrome/browser/sync_file_system/sync_process_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_PROCESS_RUNNER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_PROCESS_RUNNER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_PROCESS_RUNNER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_PROCESS_RUNNER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 22 matching lines...) Expand all
33 virtual SyncFileSystemService* GetSyncService() = 0; 33 virtual SyncFileSystemService* GetSyncService() = 0;
34 }; 34 };
35 35
36 class TimerHelper { 36 class TimerHelper {
37 public: 37 public:
38 virtual ~TimerHelper() {} 38 virtual ~TimerHelper() {}
39 virtual bool IsRunning() = 0; 39 virtual bool IsRunning() = 0;
40 virtual void Start(const tracked_objects::Location& from_here, 40 virtual void Start(const tracked_objects::Location& from_here,
41 const base::TimeDelta& delay, 41 const base::TimeDelta& delay,
42 const base::Closure& closure) = 0; 42 const base::Closure& closure) = 0;
43 virtual base::TimeTicks Now() const = 0;
43 44
44 protected: 45 protected:
45 TimerHelper() {} 46 TimerHelper() {}
46 }; 47 };
47 48
48 SyncProcessRunner(const std::string& name, 49 SyncProcessRunner(const std::string& name,
49 Client* client, 50 Client* client,
50 scoped_ptr<TimerHelper> timer_helper, 51 scoped_ptr<TimerHelper> timer_helper,
51 int max_parallel_task); 52 int max_parallel_task);
52 virtual ~SyncProcessRunner(); 53 virtual ~SyncProcessRunner();
(...skipping 30 matching lines...) Expand all
83 int64 last_delay_; 84 int64 last_delay_;
84 int64 pending_changes_; 85 int64 pending_changes_;
85 base::WeakPtrFactory<SyncProcessRunner> factory_; 86 base::WeakPtrFactory<SyncProcessRunner> factory_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(SyncProcessRunner); 88 DISALLOW_COPY_AND_ASSIGN(SyncProcessRunner);
88 }; 89 };
89 90
90 } // namespace sync_file_system 91 } // namespace sync_file_system
91 92
92 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_PROCESS_RUNNER_H_ 93 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_PROCESS_RUNNER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/sync_process_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698