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

Side by Side Diff: components/drive/file_system.cc

Issue 1314803004: Move chrome/browser/chromeos/drive/file_system.cc (+deps) into components/drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 years, 3 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
« no previous file with comments | « components/drive/file_system.h ('k') | components/drive/file_system_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "components/drive/file_system.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/chromeos/drive/directory_loader.h"
11 #include "chrome/browser/chromeos/drive/file_system_observer.h"
12 #include "chrome/browser/chromeos/drive/remove_stale_cache_files.h"
13 #include "chrome/browser/chromeos/drive/search_metadata.h"
14 #include "chrome/browser/chromeos/drive/sync_client.h"
15 #include "components/drive/change_list_loader.h" 10 #include "components/drive/change_list_loader.h"
11 #include "components/drive/directory_loader.h"
16 #include "components/drive/drive.pb.h" 12 #include "components/drive/drive.pb.h"
17 #include "components/drive/drive_pref_names.h" 13 #include "components/drive/drive_pref_names.h"
18 #include "components/drive/file_cache.h" 14 #include "components/drive/file_cache.h"
19 #include "components/drive/file_change.h" 15 #include "components/drive/file_change.h"
20 #include "components/drive/file_system/copy_operation.h" 16 #include "components/drive/file_system/copy_operation.h"
21 #include "components/drive/file_system/create_directory_operation.h" 17 #include "components/drive/file_system/create_directory_operation.h"
22 #include "components/drive/file_system/create_file_operation.h" 18 #include "components/drive/file_system/create_file_operation.h"
23 #include "components/drive/file_system/download_operation.h" 19 #include "components/drive/file_system/download_operation.h"
24 #include "components/drive/file_system/get_file_for_saving_operation.h" 20 #include "components/drive/file_system/get_file_for_saving_operation.h"
25 #include "components/drive/file_system/move_operation.h" 21 #include "components/drive/file_system/move_operation.h"
26 #include "components/drive/file_system/open_file_operation.h" 22 #include "components/drive/file_system/open_file_operation.h"
27 #include "components/drive/file_system/remove_operation.h" 23 #include "components/drive/file_system/remove_operation.h"
28 #include "components/drive/file_system/search_operation.h" 24 #include "components/drive/file_system/search_operation.h"
29 #include "components/drive/file_system/set_property_operation.h" 25 #include "components/drive/file_system/set_property_operation.h"
30 #include "components/drive/file_system/touch_operation.h" 26 #include "components/drive/file_system/touch_operation.h"
31 #include "components/drive/file_system/truncate_operation.h" 27 #include "components/drive/file_system/truncate_operation.h"
32 #include "components/drive/file_system_core_util.h" 28 #include "components/drive/file_system_core_util.h"
29 #include "components/drive/file_system_observer.h"
33 #include "components/drive/job_scheduler.h" 30 #include "components/drive/job_scheduler.h"
31 #include "components/drive/remove_stale_cache_files.h"
34 #include "components/drive/resource_entry_conversion.h" 32 #include "components/drive/resource_entry_conversion.h"
33 #include "components/drive/search_metadata.h"
34 #include "components/drive/sync_client.h"
35 #include "google_apis/drive/drive_api_parser.h" 35 #include "google_apis/drive/drive_api_parser.h"
36 36
37 namespace drive { 37 namespace drive {
38 namespace { 38 namespace {
39 39
40 // Gets a ResourceEntry from the metadata, and overwrites its file info when the 40 // Gets a ResourceEntry from the metadata, and overwrites its file info when the
41 // cached file is dirty. 41 // cached file is dirty.
42 FileError GetLocallyStoredResourceEntry( 42 FileError GetLocallyStoredResourceEntry(
43 internal::ResourceMetadata* resource_metadata, 43 internal::ResourceMetadata* resource_metadata,
44 internal::FileCache* cache, 44 internal::FileCache* cache,
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1051
1052 void FileSystem::CalculateEvictableCacheSize( 1052 void FileSystem::CalculateEvictableCacheSize(
1053 const EvictableCacheSizeCallback& callback) { 1053 const EvictableCacheSizeCallback& callback) {
1054 DCHECK(thread_checker_.CalledOnValidThread()); 1054 DCHECK(thread_checker_.CalledOnValidThread());
1055 DCHECK(!callback.is_null()); 1055 DCHECK(!callback.is_null());
1056 base::PostTaskAndReplyWithResult( 1056 base::PostTaskAndReplyWithResult(
1057 blocking_task_runner_.get(), FROM_HERE, 1057 blocking_task_runner_.get(), FROM_HERE,
1058 base::Bind(&CalculateEvictableCacheSizeOnBlockingPool, cache_), callback); 1058 base::Bind(&CalculateEvictableCacheSizeOnBlockingPool, cache_), callback);
1059 } 1059 }
1060 } // namespace drive 1060 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/file_system.h ('k') | components/drive/file_system_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698