OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/drive/drive_uploader.h" | 5 #include "chrome/browser/drive/drive_uploader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/task_runner_util.h" | 13 #include "base/task_runner_util.h" |
14 #include "chrome/browser/drive/drive_service_interface.h" | 14 #include "chrome/browser/drive/drive_service_interface.h" |
15 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | |
16 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/power_save_blocker.h" | 16 #include "content/public/browser/power_save_blocker.h" |
| 17 #include "google_apis/drive/gdata_wapi_parser.h" |
18 | 18 |
19 using content::BrowserThread; | 19 using content::BrowserThread; |
20 using google_apis::CancelCallback; | 20 using google_apis::CancelCallback; |
21 using google_apis::GDATA_CANCELLED; | 21 using google_apis::GDATA_CANCELLED; |
22 using google_apis::GDataErrorCode; | 22 using google_apis::GDataErrorCode; |
23 using google_apis::GDATA_NO_SPACE; | 23 using google_apis::GDATA_NO_SPACE; |
24 using google_apis::HTTP_CONFLICT; | 24 using google_apis::HTTP_CONFLICT; |
25 using google_apis::HTTP_CREATED; | 25 using google_apis::HTTP_CREATED; |
26 using google_apis::HTTP_FORBIDDEN; | 26 using google_apis::HTTP_FORBIDDEN; |
27 using google_apis::HTTP_NOT_FOUND; | 27 using google_apis::HTTP_NOT_FOUND; |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // Discard the upload location because no request could succeed with it. | 421 // Discard the upload location because no request could succeed with it. |
422 // Maybe it's obsolete. | 422 // Maybe it's obsolete. |
423 upload_file_info->upload_location = GURL(); | 423 upload_file_info->upload_location = GURL(); |
424 } | 424 } |
425 | 425 |
426 upload_file_info->completion_callback.Run( | 426 upload_file_info->completion_callback.Run( |
427 error, upload_file_info->upload_location, scoped_ptr<ResourceEntry>()); | 427 error, upload_file_info->upload_location, scoped_ptr<ResourceEntry>()); |
428 } | 428 } |
429 | 429 |
430 } // namespace drive | 430 } // namespace drive |
OLD | NEW |