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

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: Created 7 years, 7 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 "chrome/browser/chromeos/drive/drive.pb.h" 9 #include "chrome/browser/chromeos/drive/drive.pb.h"
10 #include "chrome/browser/chromeos/drive/file_cache.h" 10 #include "chrome/browser/chromeos/drive/file_cache.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (error != FILE_ERROR_NOT_FOUND) { 168 if (error != FILE_ERROR_NOT_FOUND) {
169 callback.Run(error); 169 callback.Run(error);
170 return; 170 return;
171 } 171 }
172 172
173 scheduler_->CreateFile( 173 scheduler_->CreateFile(
174 *parent_resource_id, 174 *parent_resource_id,
175 file_path, 175 file_path,
176 file_path.BaseName().value(), 176 file_path.BaseName().value(),
177 *mime_type, 177 *mime_type,
178 DriveClientContext(USER_INITIATED), 178 ClientContext(USER_INITIATED),
179 base::Bind(&CreateFileOperation::CreateFileAfterUpload, 179 base::Bind(&CreateFileOperation::CreateFileAfterUpload,
180 weak_ptr_factory_.GetWeakPtr(), 180 weak_ptr_factory_.GetWeakPtr(),
181 callback)); 181 callback));
182 } 182 }
183 183
184 void CreateFileOperation::CreateFileAfterUpload( 184 void CreateFileOperation::CreateFileAfterUpload(
185 const FileOperationCallback& callback, 185 const FileOperationCallback& callback,
186 google_apis::GDataErrorCode gdata_error, 186 google_apis::GDataErrorCode gdata_error,
187 scoped_ptr<google_apis::ResourceEntry> resource_entry) { 187 scoped_ptr<google_apis::ResourceEntry> resource_entry) {
188 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 188 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 27 matching lines...) Expand all
216 216
217 // Notify observer if the file creation process is successfully done. 217 // Notify observer if the file creation process is successfully done.
218 if (error == FILE_ERROR_OK) 218 if (error == FILE_ERROR_OK)
219 observer_->OnDirectoryChangedByOperation(file_path->DirName()); 219 observer_->OnDirectoryChangedByOperation(file_path->DirName());
220 220
221 callback.Run(error); 221 callback.Run(error);
222 } 222 }
223 223
224 } // namespace file_system 224 } // namespace file_system
225 } // namespace drive 225 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698