| 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> |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 directory_name, | 303 directory_name, |
| 304 callback)); | 304 callback)); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void APIUtil::DidGetDirectory(const std::string& parent_resource_id, | 307 void APIUtil::DidGetDirectory(const std::string& parent_resource_id, |
| 308 const std::string& directory_name, | 308 const std::string& directory_name, |
| 309 const ResourceIdCallback& callback, | 309 const ResourceIdCallback& callback, |
| 310 google_apis::GDataErrorCode error, | 310 google_apis::GDataErrorCode error, |
| 311 scoped_ptr<google_apis::ResourceList> feed) { | 311 scoped_ptr<google_apis::ResourceList> feed) { |
| 312 DCHECK(CalledOnValidThread()); | 312 DCHECK(CalledOnValidThread()); |
| 313 DCHECK(IsStringASCII(directory_name)); | 313 DCHECK(base::IsStringASCII(directory_name)); |
| 314 | 314 |
| 315 if (error != google_apis::HTTP_SUCCESS) { | 315 if (error != google_apis::HTTP_SUCCESS) { |
| 316 DVLOG(2) << "Error on getting Drive directory: " << error; | 316 DVLOG(2) << "Error on getting Drive directory: " << error; |
| 317 callback.Run(error, std::string()); | 317 callback.Run(error, std::string()); |
| 318 return; | 318 return; |
| 319 } | 319 } |
| 320 | 320 |
| 321 std::string resource_id; | 321 std::string resource_id; |
| 322 ParentType parent_type = PARENT_TYPE_DIRECTORY; | 322 ParentType parent_type = PARENT_TYPE_DIRECTORY; |
| 323 if (parent_resource_id.empty()) { | 323 if (parent_resource_id.empty()) { |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 std::string APIUtil::GetRootResourceId() const { | 1125 std::string APIUtil::GetRootResourceId() const { |
| 1126 if (IsDriveAPIDisabled()) | 1126 if (IsDriveAPIDisabled()) |
| 1127 return drive_service_->GetRootResourceId(); | 1127 return drive_service_->GetRootResourceId(); |
| 1128 return root_resource_id_; | 1128 return root_resource_id_; |
| 1129 } | 1129 } |
| 1130 | 1130 |
| 1131 } // namespace drive_backend | 1131 } // namespace drive_backend |
| 1132 } // namespace sync_file_system | 1132 } // namespace sync_file_system |
| OLD | NEW |