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 "components/sync/driver/data_type_controller.h" | 5 #include "components/sync/driver/data_type_controller.h" |
6 | 6 |
7 #include "components/sync/base/data_type_histogram.h" | 7 #include "components/sync/base/data_type_histogram.h" |
8 #include "components/sync/base/model_type.h" | |
9 #include "components/sync/core/user_share.h" | 8 #include "components/sync/core/user_share.h" |
10 | 9 |
11 namespace sync_driver { | 10 namespace sync_driver { |
12 | 11 |
13 DataTypeController::DataTypeController(syncer::ModelType type, | 12 DataTypeController::DataTypeController(syncer::ModelType type, |
14 const base::Closure& dump_stack) | 13 const base::Closure& dump_stack) |
15 : dump_stack_(dump_stack), type_(type) {} | 14 : dump_stack_(dump_stack), type_(type) {} |
16 | 15 |
17 DataTypeController::~DataTypeController() {} | 16 DataTypeController::~DataTypeController() {} |
18 | 17 |
19 bool DataTypeController::IsUnrecoverableResult(ConfigureResult result) { | 18 bool DataTypeController::IsUnrecoverableResult(ConfigureResult result) { |
20 return (result == UNRECOVERABLE_ERROR); | 19 return (result == UNRECOVERABLE_ERROR); |
21 } | 20 } |
22 | 21 |
23 bool DataTypeController::IsSuccessfulResult(ConfigureResult result) { | 22 bool DataTypeController::IsSuccessfulResult(ConfigureResult result) { |
24 return (result == OK || result == OK_FIRST_RUN); | 23 return (result == OK || result == OK_FIRST_RUN); |
25 } | 24 } |
26 | 25 |
27 bool DataTypeController::ReadyForStart() const { | 26 bool DataTypeController::ReadyForStart() const { |
28 return true; | 27 return true; |
29 } | 28 } |
30 | 29 |
31 bool DataTypeController::CalledOnValidThread() const { | 30 bool DataTypeController::CalledOnValidThread() const { |
32 return thread_checker_.CalledOnValidThread(); | 31 return thread_checker_.CalledOnValidThread(); |
33 } | 32 } |
34 | 33 |
35 } // namespace sync_driver | 34 } // namespace sync_driver |
OLD | NEW |