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

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

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

Powered by Google App Engine
This is Rietveld 408576698