| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" |
| 6 | 6 |
| 7 #include <string> | |
| 8 | |
| 9 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 8 #include "base/logging.h" |
| 11 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 12 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| 13 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 14 #include "chrome/browser/drive/drive_api_util.h" | 12 #include "chrome/browser/drive/drive_api_util.h" |
| 15 #include "chrome/browser/google_apis/drive_api_parser.h" | 13 #include "chrome/browser/google_apis/drive_api_parser.h" |
| 16 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | 14 #include "chrome/browser/google_apis/gdata_wapi_parser.h" |
| 17 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants.
h" | 15 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants.
h" |
| 18 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" | 16 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 base::FilePath temp_file_path; | 109 base::FilePath temp_file_path; |
| 112 if (!file_util::CreateTemporaryFile(&temp_file_path)) | 110 if (!file_util::CreateTemporaryFile(&temp_file_path)) |
| 113 return webkit_blob::ScopedFile(); | 111 return webkit_blob::ScopedFile(); |
| 114 | 112 |
| 115 return webkit_blob::ScopedFile( | 113 return webkit_blob::ScopedFile( |
| 116 temp_file_path, | 114 temp_file_path, |
| 117 webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT, | 115 webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT, |
| 118 base::MessageLoopProxy::current().get()); | 116 base::MessageLoopProxy::current().get()); |
| 119 } | 117 } |
| 120 | 118 |
| 119 std::string FileKindToString(FileKind file_kind) { |
| 120 switch (file_kind) { |
| 121 case FILE_KIND_UNSUPPORTED: |
| 122 return "unsupported"; |
| 123 case FILE_KIND_FILE: |
| 124 return "file"; |
| 125 case FILE_KIND_FOLDER: |
| 126 return "folder"; |
| 127 } |
| 128 |
| 129 NOTREACHED(); |
| 130 return "unknown"; |
| 131 } |
| 132 |
| 121 } // namespace drive_backend | 133 } // namespace drive_backend |
| 122 } // namespace sync_file_system | 134 } // namespace sync_file_system |
| OLD | NEW |