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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.cc

Issue 314303003: [SyncFS] Create SyncWorkerTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/drive_backend/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index a66d82b697a911fe2affcac124202bbf6e946414..d60b820ce87027938285f5a9c03252943e0a4829 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -124,8 +124,6 @@ class SyncEngine::WorkerObserver : public SyncWorker::Observer {
namespace {
-void EmptyStatusCallback(SyncStatusCode status) {}
-
void DidRegisterOrigin(const base::TimeTicks& start_time,
const SyncStatusCallback& callback,
SyncStatusCode status) {
@@ -535,45 +533,6 @@ void SyncEngine::UpdateServiceState(RemoteServiceState state,
OnRemoteServiceStateUpdated(state, description));
}
-void SyncEngine::UpdateRegisteredAppsForTesting() {
- if (!extension_service_)
- return;
-
- MetadataDatabase* metadata_db = sync_worker_->GetMetadataDatabase();
- DCHECK(metadata_db);
- std::vector<std::string> app_ids;
- metadata_db->GetRegisteredAppIDs(&app_ids);
-
- // Update the status of every origin using status from ExtensionService.
- for (std::vector<std::string>::const_iterator itr = app_ids.begin();
- itr != app_ids.end(); ++itr) {
- const std::string& app_id = *itr;
- GURL origin =
- extensions::Extension::GetBaseURLFromExtensionId(app_id);
- if (!extension_service_->GetInstalledExtension(app_id)) {
- // Extension has been uninstalled.
- // (At this stage we can't know if it was unpacked extension or not,
- // so just purge the remote folder.)
- UninstallOrigin(origin,
- RemoteFileSyncService::UNINSTALL_AND_PURGE_REMOTE,
- base::Bind(&EmptyStatusCallback));
- continue;
- }
- FileTracker tracker;
- if (!metadata_db->FindAppRootTracker(app_id, &tracker)) {
- // App will register itself on first run.
- continue;
- }
- bool is_app_enabled = extension_service_->IsExtensionEnabled(app_id);
- bool is_app_root_tracker_enabled =
- tracker.tracker_kind() == TRACKER_KIND_APP_ROOT;
- if (is_app_enabled && !is_app_root_tracker_enabled)
- EnableOrigin(origin, base::Bind(&EmptyStatusCallback));
- else if (!is_app_enabled && is_app_root_tracker_enabled)
- DisableOrigin(origin, base::Bind(&EmptyStatusCallback));
- }
-}
-
SyncStatusCallback SyncEngine::TrackCallback(
const SyncStatusCallback& callback) {
return callback_tracker_.Register(

Powered by Google App Engine
This is Rietveld 408576698