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

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

Issue 10496002: Revert 140102 - Remove old PostDelayedTask interfaces that use int ms instead of TimeDelta. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « base/threading/worker_pool.cc ('k') | cloud_print/service/win/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 }
38 MOCK_METHOD3(PostDelayedTask, bool(const tracked_objects::Location&, 44 MOCK_METHOD3(PostDelayedTask, bool(const tracked_objects::Location&,
39 const base::Closure&, 45 const base::Closure&,
40 base::TimeDelta)); 46 base::TimeDelta));
41 47
42 protected: 48 protected:
43 virtual ~TestTaskRunner() {} 49 virtual ~TestTaskRunner() {}
44 50
45 private: 51 private:
46 DISALLOW_COPY_AND_ASSIGN(TestTaskRunner); 52 DISALLOW_COPY_AND_ASSIGN(TestTaskRunner);
47 }; 53 };
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } while (GetParam().backoff_factor > 1 && 280 } while (GetParam().backoff_factor > 1 &&
275 expected_delay_ms <= kPolicyRefreshRate); 281 expected_delay_ms <= kPolicyRefreshRate);
276 } 282 }
277 } 283 }
278 284
279 INSTANTIATE_TEST_CASE_P(CloudPolicyRefreshSchedulerClientErrorTest, 285 INSTANTIATE_TEST_CASE_P(CloudPolicyRefreshSchedulerClientErrorTest,
280 CloudPolicyRefreshSchedulerClientErrorTest, 286 CloudPolicyRefreshSchedulerClientErrorTest,
281 testing::ValuesIn(kClientErrorTestCases)); 287 testing::ValuesIn(kClientErrorTestCases));
282 288
283 } // namespace policy 289 } // namespace policy
OLDNEW
« no previous file with comments | « base/threading/worker_pool.cc ('k') | cloud_print/service/win/service_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698