| 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_v1/api_util.h" | 5 #include "chrome/browser/sync_file_system/drive_backend_v1/api_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/browser/drive/drive_api_service.h" | 18 #include "chrome/browser/drive/drive_api_service.h" |
| 19 #include "chrome/browser/drive/drive_api_util.h" | 19 #include "chrome/browser/drive/drive_api_util.h" |
| 20 #include "chrome/browser/drive/drive_uploader.h" | 20 #include "chrome/browser/drive/drive_uploader.h" |
| 21 #include "chrome/browser/drive/gdata_wapi_service.h" | 21 #include "chrome/browser/drive/gdata_wapi_service.h" |
| 22 #include "chrome/browser/google_apis/drive_api_parser.h" | 22 #include "chrome/browser/google_apis/drive_api_parser.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 24 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
| 25 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 25 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 26 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_util.
h" | 26 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_util.
h" |
| 27 #include "chrome/browser/sync_file_system/logger.h" | 27 #include "chrome/browser/sync_file_system/logger.h" |
| 28 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" | 28 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" |
| 29 #include "chrome/common/extensions/extension.h" | |
| 30 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
| 31 #include "extensions/common/constants.h" | 30 #include "extensions/common/constants.h" |
| 31 #include "extensions/common/extension.h" |
| 32 #include "net/base/mime_util.h" | 32 #include "net/base/mime_util.h" |
| 33 | 33 |
| 34 namespace sync_file_system { | 34 namespace sync_file_system { |
| 35 namespace drive_backend { | 35 namespace drive_backend { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 enum ParentType { | 39 enum ParentType { |
| 40 PARENT_TYPE_ROOT_OR_EMPTY, | 40 PARENT_TYPE_ROOT_OR_EMPTY, |
| 41 PARENT_TYPE_DIRECTORY, | 41 PARENT_TYPE_DIRECTORY, |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 std::string APIUtil::GetRootResourceId() const { | 1147 std::string APIUtil::GetRootResourceId() const { |
| 1148 if (IsDriveAPIDisabled()) | 1148 if (IsDriveAPIDisabled()) |
| 1149 return drive_service_->GetRootResourceId(); | 1149 return drive_service_->GetRootResourceId(); |
| 1150 return root_resource_id_; | 1150 return root_resource_id_; |
| 1151 } | 1151 } |
| 1152 | 1152 |
| 1153 } // namespace drive_backend | 1153 } // namespace drive_backend |
| 1154 } // namespace sync_file_system | 1154 } // namespace sync_file_system |
| OLD | NEW |