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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/create_file_operation.cc

Issue 15650008: drive: Rename drive::DriveClientContext to drive::ClientContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/drive/file_system/create_file_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/create_file_operation.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 "chrome/browser/chromeos/drive/drive.pb.h" 10 #include "chrome/browser/chromeos/drive/drive.pb.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (error != FILE_ERROR_NOT_FOUND) { 172 if (error != FILE_ERROR_NOT_FOUND) {
173 callback.Run(error); 173 callback.Run(error);
174 return; 174 return;
175 } 175 }
176 176
177 scheduler_->CreateFile( 177 scheduler_->CreateFile(
178 *parent_resource_id, 178 *parent_resource_id,
179 file_path, 179 file_path,
180 file_path.BaseName().value(), 180 file_path.BaseName().value(),
181 *mime_type, 181 *mime_type,
182 DriveClientContext(USER_INITIATED), 182 ClientContext(USER_INITIATED),
183 base::Bind(&CreateFileOperation::CreateFileAfterUpload, 183 base::Bind(&CreateFileOperation::CreateFileAfterUpload,
184 weak_ptr_factory_.GetWeakPtr(), 184 weak_ptr_factory_.GetWeakPtr(),
185 callback)); 185 callback));
186 } 186 }
187 187
188 void CreateFileOperation::CreateFileAfterUpload( 188 void CreateFileOperation::CreateFileAfterUpload(
189 const FileOperationCallback& callback, 189 const FileOperationCallback& callback,
190 google_apis::GDataErrorCode gdata_error, 190 google_apis::GDataErrorCode gdata_error,
191 scoped_ptr<google_apis::ResourceEntry> resource_entry) { 191 scoped_ptr<google_apis::ResourceEntry> resource_entry) {
192 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 192 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 27 matching lines...) Expand all
220 220
221 // Notify observer if the file creation process is successfully done. 221 // Notify observer if the file creation process is successfully done.
222 if (error == FILE_ERROR_OK) 222 if (error == FILE_ERROR_OK)
223 observer_->OnDirectoryChangedByOperation(file_path->DirName()); 223 observer_->OnDirectoryChangedByOperation(file_path->DirName());
224 224
225 callback.Run(error); 225 callback.Run(error);
226 } 226 }
227 227
228 } // namespace file_system 228 } // namespace file_system
229 } // namespace drive 229 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/download_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698