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

Unified Diff: chrome/browser/chromeos/drive/sync/entry_update_performer.h

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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/sync/entry_update_performer.h
diff --git a/chrome/browser/chromeos/drive/sync/entry_update_performer.h b/chrome/browser/chromeos/drive/sync/entry_update_performer.h
deleted file mode 100644
index 2a3997acf4dfa738fbfa5d48c2e96890a64eeb38..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/drive/sync/entry_update_performer.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_
-#define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_
-
-#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/thread_checker.h"
-#include "components/drive/file_errors.h"
-#include "google_apis/drive/drive_api_error_codes.h"
-
-namespace base {
-class ScopedClosureRunner;
-class SequencedTaskRunner;
-} // namespace base
-
-namespace google_apis {
-class FileResource;
-} // namespace google_apis
-
-namespace drive {
-
-class FileChange;
-class JobScheduler;
-class ResourceEntry;
-struct ClientContext;
-
-namespace file_system {
-class OperationDelegate;
-} // namespace file_system
-
-namespace internal {
-
-class EntryRevertPerformer;
-class FileCache;
-class LoaderController;
-class RemovePerformer;
-class ResourceMetadata;
-
-// This class is responsible to perform server side update of an entry.
-class EntryUpdatePerformer {
- public:
- EntryUpdatePerformer(base::SequencedTaskRunner* blocking_task_runner,
- file_system::OperationDelegate* delegate,
- JobScheduler* scheduler,
- ResourceMetadata* metadata,
- FileCache* cache,
- LoaderController* loader_controller);
- ~EntryUpdatePerformer();
-
- // Requests the server to update the metadata of the entry specified by
- // |local_id| with the locally stored one.
- // Invokes |callback| when finished with the result of the operation.
- // |callback| must not be null.
- void UpdateEntry(const std::string& local_id,
- const ClientContext& context,
- const FileOperationCallback& callback);
-
- struct LocalState;
-
- private:
- // Part of UpdateEntry(). Called after local metadata look up.
- void UpdateEntryAfterPrepare(const ClientContext& context,
- const FileOperationCallback& callback,
- scoped_ptr<LocalState> local_state,
- FileError error);
-
- // Part of UpdateEntry(). Called after UpdateResource is completed.
- void UpdateEntryAfterUpdateResource(
- const ClientContext& context,
- const FileOperationCallback& callback,
- scoped_ptr<LocalState> local_state,
- scoped_ptr<base::ScopedClosureRunner> loader_lock,
- google_apis::DriveApiErrorCode status,
- scoped_ptr<google_apis::FileResource> entry);
-
- // Part of UpdateEntry(). Called after FinishUpdate is completed.
- void UpdateEntryAfterFinish(const FileOperationCallback& callback,
- const FileChange* changed_files,
- FileError error);
-
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
- file_system::OperationDelegate* delegate_;
- JobScheduler* scheduler_;
- ResourceMetadata* metadata_;
- FileCache* cache_;
- LoaderController* loader_controller_;
- scoped_ptr<RemovePerformer> remove_performer_;
- scoped_ptr<EntryRevertPerformer> entry_revert_performer_;
-
- base::ThreadChecker thread_checker_;
-
- // Note: This should remain the last member so it'll be destroyed and
- // invalidate the weak pointers before any other members are destroyed.
- base::WeakPtrFactory<EntryUpdatePerformer> weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(EntryUpdatePerformer);
-};
-
-} // namespace internal
-} // namespace drive
-
-#endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_

Powered by Google App Engine
This is Rietveld 408576698