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

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

Issue 168363003: drive: Move ClientContext to job_scheduler.h (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 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/truncate_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/truncate_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_platform_file_closer.h" 10 #include "base/files/scoped_platform_file_closer.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "base/sequenced_task_runner.h" 14 #include "base/sequenced_task_runner.h"
15 #include "base/task_runner_util.h" 15 #include "base/task_runner_util.h"
16 #include "chrome/browser/chromeos/drive/drive.pb.h" 16 #include "chrome/browser/chromeos/drive/drive.pb.h"
17 #include "chrome/browser/chromeos/drive/file_cache.h" 17 #include "chrome/browser/chromeos/drive/file_cache.h"
18 #include "chrome/browser/chromeos/drive/file_errors.h" 18 #include "chrome/browser/chromeos/drive/file_errors.h"
19 #include "chrome/browser/chromeos/drive/file_system/download_operation.h" 19 #include "chrome/browser/chromeos/drive/file_system/download_operation.h"
20 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" 20 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h"
21 #include "chrome/browser/chromeos/drive/job_scheduler.h"
21 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
22 23
23 using content::BrowserThread; 24 using content::BrowserThread;
24 25
25 namespace drive { 26 namespace drive {
26 namespace file_system { 27 namespace file_system {
27 namespace { 28 namespace {
28 29
29 // Truncates the local file at |local_cache_path| to the |length| bytes, 30 // Truncates the local file at |local_cache_path| to the |length| bytes,
30 // then marks the resource is dirty on |cache|. 31 // then marks the resource is dirty on |cache|.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 147 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
147 DCHECK(!callback.is_null()); 148 DCHECK(!callback.is_null());
148 149
149 observer_->OnEntryUpdatedByOperation(local_id); 150 observer_->OnEntryUpdatedByOperation(local_id);
150 151
151 callback.Run(error); 152 callback.Run(error);
152 } 153 }
153 154
154 } // namespace file_system 155 } // namespace file_system
155 } // namespace drive 156 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698