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

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

Issue 1296483003: Move chrome/browser/chromeos/drive/resource* (+deps) into components/drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 years, 4 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
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.h" 9 #include "base/files/file.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/sequenced_task_runner.h" 12 #include "base/sequenced_task_runner.h"
13 #include "base/task_runner_util.h" 13 #include "base/task_runner_util.h"
14 #include "base/thread_task_runner_handle.h" 14 #include "base/thread_task_runner_handle.h"
15 #include "chrome/browser/chromeos/drive/file_cache.h"
16 #include "chrome/browser/chromeos/drive/file_system/download_operation.h" 15 #include "chrome/browser/chromeos/drive/file_system/download_operation.h"
17 #include "chrome/browser/chromeos/drive/file_system/operation_delegate.h" 16 #include "chrome/browser/chromeos/drive/file_system/operation_delegate.h"
18 #include "components/drive/drive.pb.h" 17 #include "components/drive/drive.pb.h"
18 #include "components/drive/file_cache.h"
19 #include "components/drive/file_errors.h" 19 #include "components/drive/file_errors.h"
20 #include "components/drive/job_scheduler.h" 20 #include "components/drive/job_scheduler.h"
21 21
22 namespace drive { 22 namespace drive {
23 namespace file_system { 23 namespace file_system {
24 namespace { 24 namespace {
25 25
26 // Truncates the local file at |local_cache_path| to the |length| bytes, 26 // Truncates the local file at |local_cache_path| to the |length| bytes,
27 // then marks the resource is dirty on |cache|. 27 // then marks the resource is dirty on |cache|.
28 FileError TruncateOnBlockingPool(internal::ResourceMetadata* metadata, 28 FileError TruncateOnBlockingPool(internal::ResourceMetadata* metadata,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 DCHECK(thread_checker_.CalledOnValidThread()); 136 DCHECK(thread_checker_.CalledOnValidThread());
137 DCHECK(!callback.is_null()); 137 DCHECK(!callback.is_null());
138 138
139 delegate_->OnEntryUpdatedByOperation(ClientContext(USER_INITIATED), local_id); 139 delegate_->OnEntryUpdatedByOperation(ClientContext(USER_INITIATED), local_id);
140 140
141 callback.Run(error); 141 callback.Run(error);
142 } 142 }
143 143
144 } // namespace file_system 144 } // namespace file_system
145 } // namespace drive 145 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698