OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "sync/test/engine/mock_nudge_handler.h" | 5 #include "components/sync/base/model_type.h" |
6 #include "sync/internal_api/public/base/model_type.h" | 6 #include "components/sync/test/engine/mock_nudge_handler.h" |
7 | 7 |
8 namespace syncer { | 8 namespace syncer { |
9 | 9 |
10 MockNudgeHandler::MockNudgeHandler() | 10 MockNudgeHandler::MockNudgeHandler() |
11 : num_initial_nudges_(0), num_commit_nudges_(0), num_refresh_nudges_(0) { | 11 : num_initial_nudges_(0), num_commit_nudges_(0), num_refresh_nudges_(0) {} |
12 } | |
13 | 12 |
14 MockNudgeHandler::~MockNudgeHandler() { | 13 MockNudgeHandler::~MockNudgeHandler() {} |
15 } | |
16 | 14 |
17 void MockNudgeHandler::NudgeForInitialDownload(syncer::ModelType type) { | 15 void MockNudgeHandler::NudgeForInitialDownload(syncer::ModelType type) { |
18 num_initial_nudges_++; | 16 num_initial_nudges_++; |
19 } | 17 } |
20 | 18 |
21 void MockNudgeHandler::NudgeForCommit(syncer::ModelType type) { | 19 void MockNudgeHandler::NudgeForCommit(syncer::ModelType type) { |
22 num_commit_nudges_++; | 20 num_commit_nudges_++; |
23 } | 21 } |
24 | 22 |
25 void MockNudgeHandler::NudgeForRefresh(syncer::ModelType type) { | 23 void MockNudgeHandler::NudgeForRefresh(syncer::ModelType type) { |
(...skipping 12 matching lines...) Expand all Loading... |
38 return num_refresh_nudges_; | 36 return num_refresh_nudges_; |
39 } | 37 } |
40 | 38 |
41 void MockNudgeHandler::ClearCounters() { | 39 void MockNudgeHandler::ClearCounters() { |
42 num_initial_nudges_ = 0; | 40 num_initial_nudges_ = 0; |
43 num_commit_nudges_ = 0; | 41 num_commit_nudges_ = 0; |
44 num_refresh_nudges_ = 0; | 42 num_refresh_nudges_ = 0; |
45 } | 43 } |
46 | 44 |
47 } // namespace syncer | 45 } // namespace syncer |
OLD | NEW |