Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: chrome/browser/google_apis/fake_drive_service.cc

Issue 15989002: Add UpdateOperationTest for drive::file_system::UpdateOperationTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Reflect review comment Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698