Home | History | Annotate | Download | only in sync_driver
      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
      3 // found in the LICENSE file.
      4 
      5 #include "components/sync_driver/data_type_manager.h"
      6 
      7 namespace sync_driver {
      8 
      9 DataTypeManager::ConfigureResult::ConfigureResult()
     10     : status(UNKNOWN) {
     11 }
     12 
     13 DataTypeManager::ConfigureResult::ConfigureResult(
     14     ConfigureStatus status,
     15     syncer::ModelTypeSet requested_types)
     16     : status(status), requested_types(requested_types) {
     17 }
     18 
     19 DataTypeManager::ConfigureResult::~ConfigureResult() {
     20 }
     21 
     22 // Static.
     23 std::string DataTypeManager::ConfigureStatusToString(ConfigureStatus status) {
     24   switch (status) {
     25     case OK:
     26       return "Ok";
     27     case ABORTED:
     28       return "Aborted";
     29     case UNRECOVERABLE_ERROR:
     30       return "Unrecoverable Error";
     31     case UNKNOWN:
     32       NOTREACHED();
     33       return std::string();
     34   }
     35   return std::string();
     36 }
     37 
     38 }  // namespace sync_driver
     39