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" | |
23 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 23 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
25 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 24 #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" | 25 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_util.
h" |
27 #include "chrome/browser/sync_file_system/logger.h" | 26 #include "chrome/browser/sync_file_system/logger.h" |
28 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" | 27 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" |
29 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
30 #include "extensions/common/constants.h" | 29 #include "extensions/common/constants.h" |
31 #include "extensions/common/extension.h" | 30 #include "extensions/common/extension.h" |
| 31 #include "google_apis/drive/drive_api_parser.h" |
32 | 32 |
33 namespace sync_file_system { | 33 namespace sync_file_system { |
34 namespace drive_backend { | 34 namespace drive_backend { |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 enum ParentType { | 38 enum ParentType { |
39 PARENT_TYPE_ROOT_OR_EMPTY, | 39 PARENT_TYPE_ROOT_OR_EMPTY, |
40 PARENT_TYPE_DIRECTORY, | 40 PARENT_TYPE_DIRECTORY, |
41 }; | 41 }; |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 } | 1144 } |
1145 | 1145 |
1146 std::string APIUtil::GetRootResourceId() const { | 1146 std::string APIUtil::GetRootResourceId() const { |
1147 if (IsDriveAPIDisabled()) | 1147 if (IsDriveAPIDisabled()) |
1148 return drive_service_->GetRootResourceId(); | 1148 return drive_service_->GetRootResourceId(); |
1149 return root_resource_id_; | 1149 return root_resource_id_; |
1150 } | 1150 } |
1151 | 1151 |
1152 } // namespace drive_backend | 1152 } // namespace drive_backend |
1153 } // namespace sync_file_system | 1153 } // namespace sync_file_system |
OLD | NEW |