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/google_apis/fake_drive_service.h" | 5 #include "chrome/browser/google_apis/fake_drive_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 MessageLoop::current()->PostTask( | 1006 MessageLoop::current()->PostTask( |
1007 FROM_HERE, | 1007 FROM_HERE, |
1008 base::Bind(callback, | 1008 base::Bind(callback, |
1009 UploadRangeResponse(HTTP_RESUME_INCOMPLETE, | 1009 UploadRangeResponse(HTTP_RESUME_INCOMPLETE, |
1010 start_position, | 1010 start_position, |
1011 end_position), | 1011 end_position), |
1012 base::Passed(&result_entry))); | 1012 base::Passed(&result_entry))); |
1013 return; | 1013 return; |
1014 } | 1014 } |
1015 | 1015 |
| 1016 AddNewChangestamp(entry); |
1016 result_entry = ResourceEntry::CreateFrom(*entry).Pass(); | 1017 result_entry = ResourceEntry::CreateFrom(*entry).Pass(); |
1017 | 1018 |
1018 std::string upload_mode; | 1019 std::string upload_mode; |
1019 bool upload_mode_found = | 1020 bool upload_mode_found = |
1020 net::GetValueForKeyInQuery(upload_url, "mode", &upload_mode); | 1021 net::GetValueForKeyInQuery(upload_url, "mode", &upload_mode); |
1021 DCHECK(upload_mode_found && | 1022 DCHECK(upload_mode_found && |
1022 (upload_mode == "newfile" || upload_mode == "existing")); | 1023 (upload_mode == "newfile" || upload_mode == "existing")); |
1023 | 1024 |
1024 GDataErrorCode return_code = | 1025 GDataErrorCode return_code = |
1025 upload_mode == "newfile" ? HTTP_CREATED : HTTP_SUCCESS; | 1026 upload_mode == "newfile" ? HTTP_CREATED : HTTP_SUCCESS; |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 if (load_counter) | 1430 if (load_counter) |
1430 *load_counter += 1; | 1431 *load_counter += 1; |
1431 MessageLoop::current()->PostTask( | 1432 MessageLoop::current()->PostTask( |
1432 FROM_HERE, | 1433 FROM_HERE, |
1433 base::Bind(callback, | 1434 base::Bind(callback, |
1434 HTTP_SUCCESS, | 1435 HTTP_SUCCESS, |
1435 base::Passed(&resource_list))); | 1436 base::Passed(&resource_list))); |
1436 } | 1437 } |
1437 | 1438 |
1438 } // namespace google_apis | 1439 } // namespace google_apis |
OLD | NEW |