Move chrome/browser/chromeos/drive/resource* (+deps) into components/drive.
Files moved from chrome/browser/chromeos/drive into components/drive:
- fake_free_disk_space_getter*
- file_cache*
- file_system_core_util*
- resource_entry_conversion*
- resource_metadata*
- resource_metadata_storage*
Other changes:
- Removed unneeded includes where needed and possible.
- Hidden usage of cryptohome::kMinFreeSpaceInBytes behind OS_CHROMEOS ifdefs
and provided an equivalent constant shared by other OS-es.
- Hidden usage of base::SetPosixFilePermissions behind OS_CHROMEOS ifdef
as it was only needed to support cros_disks service on ChromeOS.
- Moved 3 functions back from file_system_core_util into file_system_core.
The 3 functions are ChromeOS-specific (dealing with where GDrive is mounted
on ChromeOS) and moving them back helps avoid adding a new dependency on
components/drive from chromeos directories.
- When adding a third_party/leveldatabase dependency to gyp/gn/deps files
under components/drive, I realized that gn is not consistent with gyp, by
not explicitly listing a dependency on third_party/cacheinvalidation in
components/drive/BUILD.gn.
Test steps:
1. Verify that things still build via GYP (and unit tests pass).
$ GYP_DEFINES="use_goma=1 gomadir=... chromeos=1" gclient sync
$ ninja -C out/Debug -j 150 chrome unit_tests \
interactive_ui_tests browser_tests drive
$ out/Debug/unit_tests
2. Verify that things still build via GN.
$ gn gen out/Default --args='target_os="chromeos" use_goma=true'
$ ninja -C out/Default -j 150 chrome unit_tests \
interactive_ui_tests browser_tests components/drive
TEST=Please see "Test steps" above.
BUG=257943, 498951
[email protected], [email protected], [email protected], [email protected], [email protected],
Review URL: https://codereview.chromium.org/1296483003
Cr-Commit-Position: refs/heads/master@{#344637}
diff --git a/chrome/browser/chromeos/drive/sync_client_unittest.cc b/chrome/browser/chromeos/drive/sync_client_unittest.cc
index 7142d86..a59936ad 100644
--- a/chrome/browser/chromeos/drive/sync_client_unittest.cc
+++ b/chrome/browser/chromeos/drive/sync_client_unittest.cc
@@ -14,19 +14,19 @@
#include "base/test/test_timeouts.h"
#include "base/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/drive/change_list_loader.h"
-#include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h"
-#include "chrome/browser/chromeos/drive/file_cache.h"
#include "chrome/browser/chromeos/drive/file_system/move_operation.h"
#include "chrome/browser/chromeos/drive/file_system/operation_delegate.h"
#include "chrome/browser/chromeos/drive/file_system/remove_operation.h"
-#include "chrome/browser/chromeos/drive/file_system_core_util.h"
-#include "chrome/browser/chromeos/drive/resource_entry_conversion.h"
-#include "chrome/browser/chromeos/drive/resource_metadata.h"
#include "components/drive/drive.pb.h"
#include "components/drive/drive_test_util.h"
#include "components/drive/event_logger.h"
+#include "components/drive/fake_free_disk_space_getter.h"
+#include "components/drive/file_cache.h"
#include "components/drive/file_change.h"
+#include "components/drive/file_system_core_util.h"
#include "components/drive/job_scheduler.h"
+#include "components/drive/resource_entry_conversion.h"
+#include "components/drive/resource_metadata.h"
#include "components/drive/service/fake_drive_service.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/drive/drive_api_parser.h"