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

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

Issue 140513008: drive: Allow setting modified/accessed date with AddNewDirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
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/drive/fake_drive_service.h" 5 #include "chrome/browser/drive/fake_drive_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 } 910 }
911 911
912 base::MessageLoop::current()->PostTask( 912 base::MessageLoop::current()->PostTask(
913 FROM_HERE, base::Bind(callback, HTTP_NOT_FOUND)); 913 FROM_HERE, base::Bind(callback, HTTP_NOT_FOUND));
914 return CancelCallback(); 914 return CancelCallback();
915 } 915 }
916 916
917 CancelCallback FakeDriveService::AddNewDirectory( 917 CancelCallback FakeDriveService::AddNewDirectory(
918 const std::string& parent_resource_id, 918 const std::string& parent_resource_id,
919 const std::string& directory_title, 919 const std::string& directory_title,
920 const AddNewDirectoryOptions& options,
920 const GetResourceEntryCallback& callback) { 921 const GetResourceEntryCallback& callback) {
921 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 922 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
922 DCHECK(!callback.is_null()); 923 DCHECK(!callback.is_null());
923 924
924 if (offline_) { 925 if (offline_) {
925 scoped_ptr<ResourceEntry> null; 926 scoped_ptr<ResourceEntry> null;
926 base::MessageLoop::current()->PostTask( 927 base::MessageLoop::current()->PostTask(
927 FROM_HERE, 928 FROM_HERE,
928 base::Bind(callback, 929 base::Bind(callback,
929 GDATA_NO_CONNECTION, 930 GDATA_NO_CONNECTION,
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 FROM_HERE, 1554 FROM_HERE,
1554 base::Bind(callback, HTTP_SUCCESS, base::Passed(&resource_list))); 1555 base::Bind(callback, HTTP_SUCCESS, base::Passed(&resource_list)));
1555 } 1556 }
1556 1557
1557 GURL FakeDriveService::GetNewUploadSessionUrl() { 1558 GURL FakeDriveService::GetNewUploadSessionUrl() {
1558 return GURL("https://upload_session_url/" + 1559 return GURL("https://upload_session_url/" +
1559 base::Int64ToString(next_upload_sequence_number_++)); 1560 base::Int64ToString(next_upload_sequence_number_++));
1560 } 1561 }
1561 1562
1562 } // namespace drive 1563 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/drive/fake_drive_service.h ('k') | chrome/browser/drive/fake_drive_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698