1// Copyright (c) 2013 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 "chrome/browser/sync_file_system/sync_operation_type.h"
6
7#include "base/logging.h"
8
9namespace sync_file_system {
10
11const char* SyncOperationTypeToString(SyncOperationType type) {
12  switch (type) {
13    case SYNC_OPERATION_ADD_FILE:
14      return "ADD_FILE";
15    case SYNC_OPERATION_ADD_DIRECTORY:
16      return "ADD_DIRECTORY";
17    case SYNC_OPERATION_UPDATE_FILE:
18      return "UPDATE_FILE";
19    case SYNC_OPERATION_DELETE:
20      return "DELETE";
21    case SYNC_OPERATION_NONE:
22      return "NONE";
23    case SYNC_OPERATION_CONFLICT:
24      return "CONFLICT";
25    case SYNC_OPERATION_RESOLVE_TO_LOCAL:
26      return "RESOLVE_TO_LOCAL";
27    case SYNC_OPERATION_RESOLVE_TO_REMOTE:
28      return "RESOLVE_TO_REMOTE";
29    case SYNC_OPERATION_DELETE_METADATA:
30      return "DELETE_METADATA";
31    case SYNC_OPERATION_FAIL:
32      return "FAIL";
33  }
34  NOTREACHED();
35  return "UNKNOWN";
36}
37
38}  // namespace sync_file_system
39