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

Side by Side Diff: components/sync/test/engine/mock_nudge_handler.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. Created 4 years, 2 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
OLDNEW
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 "components/sync/base/model_type.h" 5 #include "components/sync/base/model_type.h"
6 #include "components/sync/test/engine/mock_nudge_handler.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 12
13 MockNudgeHandler::~MockNudgeHandler() {} 13 MockNudgeHandler::~MockNudgeHandler() {}
14 14
15 void MockNudgeHandler::NudgeForInitialDownload(syncer::ModelType type) { 15 void MockNudgeHandler::NudgeForInitialDownload(ModelType type) {
16 num_initial_nudges_++; 16 num_initial_nudges_++;
17 } 17 }
18 18
19 void MockNudgeHandler::NudgeForCommit(syncer::ModelType type) { 19 void MockNudgeHandler::NudgeForCommit(ModelType type) {
20 num_commit_nudges_++; 20 num_commit_nudges_++;
21 } 21 }
22 22
23 void MockNudgeHandler::NudgeForRefresh(syncer::ModelType type) { 23 void MockNudgeHandler::NudgeForRefresh(ModelType type) {
24 num_refresh_nudges_++; 24 num_refresh_nudges_++;
25 } 25 }
26 26
27 int MockNudgeHandler::GetNumInitialDownloadNudges() const { 27 int MockNudgeHandler::GetNumInitialDownloadNudges() const {
28 return num_initial_nudges_; 28 return num_initial_nudges_;
29 } 29 }
30 30
31 int MockNudgeHandler::GetNumCommitNudges() const { 31 int MockNudgeHandler::GetNumCommitNudges() const {
32 return num_commit_nudges_; 32 return num_commit_nudges_;
33 } 33 }
34 34
35 int MockNudgeHandler::GetNumRefreshNudges() const { 35 int MockNudgeHandler::GetNumRefreshNudges() const {
36 return num_refresh_nudges_; 36 return num_refresh_nudges_;
37 } 37 }
38 38
39 void MockNudgeHandler::ClearCounters() { 39 void MockNudgeHandler::ClearCounters() {
40 num_initial_nudges_ = 0; 40 num_initial_nudges_ = 0;
41 num_commit_nudges_ = 0; 41 num_commit_nudges_ = 0;
42 num_refresh_nudges_ = 0; 42 num_refresh_nudges_ = 0;
43 } 43 }
44 44
45 } // namespace syncer 45 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698