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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/copy_operation.h

Issue 23344004: Use CopyResourceOnServer to upload JSON GDoc file on Drive API v2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 | « no previous file | chrome/browser/chromeos/drive/file_system/copy_operation.cc » ('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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 FileError error); 81 FileError error);
82 82
83 // Part of Copy(). Called after the file content is downloaded. 83 // Part of Copy(). Called after the file content is downloaded.
84 void CopyAfterDownload(const base::FilePath& dest_file_path, 84 void CopyAfterDownload(const base::FilePath& dest_file_path,
85 const FileOperationCallback& callback, 85 const FileOperationCallback& callback,
86 FileError error, 86 FileError error,
87 const base::FilePath& local_file_path, 87 const base::FilePath& local_file_path,
88 scoped_ptr<ResourceEntry> entry); 88 scoped_ptr<ResourceEntry> entry);
89 89
90 // Part of TransferFileFromLocalToRemote(). Called after preparation is done. 90 // Part of TransferFileFromLocalToRemote(). Called after preparation is done.
91 // |gdoc_resource_id| is available only if the file is JSON GDoc file. 91 // |gdoc_resource_id| and |parent_resource_id| is available only if the file
92 // is JSON GDoc file.
92 void TransferFileFromLocalToRemoteAfterPrepare( 93 void TransferFileFromLocalToRemoteAfterPrepare(
93 const base::FilePath& local_src_path, 94 const base::FilePath& local_src_path,
94 const base::FilePath& remote_dest_path, 95 const base::FilePath& remote_dest_path,
95 const FileOperationCallback& callback, 96 const FileOperationCallback& callback,
96 std::string* gdoc_resource_id, 97 std::string* gdoc_resource_id,
98 std::string* parent_resource_id,
97 FileError error); 99 FileError error);
98 100
99 // Copies resource with |resource_id| into the directory |parent_resource_id| 101 // Copies resource with |resource_id| into the directory |parent_resource_id|
100 // with renaming it to |new_title|. 102 // with renaming it to |new_title|.
101 void CopyResourceOnServer(const std::string& resource_id, 103 void CopyResourceOnServer(const std::string& resource_id,
102 const std::string& parent_resource_id, 104 const std::string& parent_resource_id,
103 const std::string& new_title, 105 const std::string& new_title,
104 const FileOperationCallback& callback); 106 const FileOperationCallback& callback);
105 107
106 // Part of CopyResourceOnServer. Called after server side copy is done. 108 // Part of CopyResourceOnServer. Called after server side copy is done.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Note: This should remain the last member so it'll be destroyed and 197 // Note: This should remain the last member so it'll be destroyed and
196 // invalidate the weak pointers before any other members are destroyed. 198 // invalidate the weak pointers before any other members are destroyed.
197 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; 199 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_;
198 DISALLOW_COPY_AND_ASSIGN(CopyOperation); 200 DISALLOW_COPY_AND_ASSIGN(CopyOperation);
199 }; 201 };
200 202
201 } // namespace file_system 203 } // namespace file_system
202 } // namespace drive 204 } // namespace drive
203 205
204 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ 206 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/copy_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698