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

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

Issue 137423010: drive: Support offline file creation (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/chromeos/drive/file_system/copy_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/copy_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 "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 internal::FileCache* cache, 156 internal::FileCache* cache,
157 const ResourceIdCanonicalizer& id_canonicalizer) 157 const ResourceIdCanonicalizer& id_canonicalizer)
158 : blocking_task_runner_(blocking_task_runner), 158 : blocking_task_runner_(blocking_task_runner),
159 observer_(observer), 159 observer_(observer),
160 scheduler_(scheduler), 160 scheduler_(scheduler),
161 metadata_(metadata), 161 metadata_(metadata),
162 cache_(cache), 162 cache_(cache),
163 id_canonicalizer_(id_canonicalizer), 163 id_canonicalizer_(id_canonicalizer),
164 create_file_operation_(new CreateFileOperation(blocking_task_runner, 164 create_file_operation_(new CreateFileOperation(blocking_task_runner,
165 observer, 165 observer,
166 scheduler, 166 metadata)),
167 metadata,
168 cache)),
169 weak_ptr_factory_(this) { 167 weak_ptr_factory_(this) {
170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
171 } 169 }
172 170
173 CopyOperation::~CopyOperation() { 171 CopyOperation::~CopyOperation() {
174 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 172 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
175 } 173 }
176 174
177 void CopyOperation::Copy(const base::FilePath& src_file_path, 175 void CopyOperation::Copy(const base::FilePath& src_file_path,
178 const base::FilePath& dest_file_path, 176 const base::FilePath& dest_file_path,
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 443 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
446 DCHECK(!callback.is_null()); 444 DCHECK(!callback.is_null());
447 445
448 if (error == FILE_ERROR_OK) 446 if (error == FILE_ERROR_OK)
449 observer_->OnEntryUpdatedByOperation(*local_id); 447 observer_->OnEntryUpdatedByOperation(*local_id);
450 callback.Run(error); 448 callback.Run(error);
451 } 449 }
452 450
453 } // namespace file_system 451 } // namespace file_system
454 } // namespace drive 452 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698