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

Side by Side Diff: chrome/browser/policy/cloud_policy_refresh_scheduler_unittest.cc

Issue 9703053: Remove old Sleep and PostDelayedTask interfaces that use int ms instead of TimeDelta. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 6 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
« no previous file with comments | « base/threading/worker_pool.cc ('k') | cloud_print/service/service_state.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 17 matching lines...) Expand all
28 28
29 namespace { 29 namespace {
30 30
31 const int64 kPolicyRefreshRate = 4 * 60 * 60 * 1000; 31 const int64 kPolicyRefreshRate = 4 * 60 * 60 * 1000;
32 32
33 class TestTaskRunner : public base::TaskRunner { 33 class TestTaskRunner : public base::TaskRunner {
34 public: 34 public:
35 TestTaskRunner() {} 35 TestTaskRunner() {}
36 36
37 virtual bool RunsTasksOnCurrentThread() const OVERRIDE { return true; } 37 virtual bool RunsTasksOnCurrentThread() const OVERRIDE { return true; }
38 virtual bool PostDelayedTask(const tracked_objects::Location&,
39 const base::Closure&,
40 int64) OVERRIDE {
41 ADD_FAILURE();
42 return false;
43 }
44 MOCK_METHOD3(PostDelayedTask, bool(const tracked_objects::Location&, 38 MOCK_METHOD3(PostDelayedTask, bool(const tracked_objects::Location&,
45 const base::Closure&, 39 const base::Closure&,
46 base::TimeDelta)); 40 base::TimeDelta));
47 41
48 protected: 42 protected:
49 virtual ~TestTaskRunner() {} 43 virtual ~TestTaskRunner() {}
50 44
51 private: 45 private:
52 DISALLOW_COPY_AND_ASSIGN(TestTaskRunner); 46 DISALLOW_COPY_AND_ASSIGN(TestTaskRunner);
53 }; 47 };
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } while (GetParam().backoff_factor > 1 && 274 } while (GetParam().backoff_factor > 1 &&
281 expected_delay_ms <= kPolicyRefreshRate); 275 expected_delay_ms <= kPolicyRefreshRate);
282 } 276 }
283 } 277 }
284 278
285 INSTANTIATE_TEST_CASE_P(CloudPolicyRefreshSchedulerClientErrorTest, 279 INSTANTIATE_TEST_CASE_P(CloudPolicyRefreshSchedulerClientErrorTest,
286 CloudPolicyRefreshSchedulerClientErrorTest, 280 CloudPolicyRefreshSchedulerClientErrorTest,
287 testing::ValuesIn(kClientErrorTestCases)); 281 testing::ValuesIn(kClientErrorTestCases));
288 282
289 } // namespace policy 283 } // namespace policy
OLDNEW
« no previous file with comments | « base/threading/worker_pool.cc ('k') | cloud_print/service/service_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698