summaryrefslogtreecommitdiffstats
path: root/components/sync_driver/data_type_manager.cc
blob: 99dc70ae5edd64c2e0ff7ca114ec918e26168725 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sync_driver/data_type_manager.h"

namespace sync_driver {

DataTypeManager::ConfigureResult::ConfigureResult()
    : status(UNKNOWN) {
}

DataTypeManager::ConfigureResult::ConfigureResult(
    ConfigureStatus status,
    syncer::ModelTypeSet requested_types)
    : status(status), requested_types(requested_types) {
}

DataTypeManager::ConfigureResult::~ConfigureResult() {
}

// Static.
std::string DataTypeManager::ConfigureStatusToString(ConfigureStatus status) {
  switch (status) {
    case OK:
      return "Ok";
    case ABORTED:
      return "Aborted";
    case UNRECOVERABLE_ERROR:
      return "Unrecoverable Error";
    case UNKNOWN:
      NOTREACHED();
      return std::string();
  }
  return std::string();
}

}  // namespace sync_driver