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

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

Issue 145173010: drive: Merge ContentUpdatePerformer to EntryUpdatePerformer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: please review this Created 6 years, 11 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/content_update_performer.h
diff --git a/chrome/browser/chromeos/drive/sync/content_update_performer.h b/chrome/browser/chromeos/drive/sync/content_update_performer.h
deleted file mode 100644
index 43db7b1d02ca7ac1d965c5d1b26447049b1d1129..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/drive/sync/content_update_performer.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2014 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_CONTENT_UPDATE_PERFORMER_H_
-#define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CONTENT_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 "chrome/browser/chromeos/drive/file_errors.h"
-#include "google_apis/drive/gdata_errorcode.h"
-
-namespace base {
-class FilePath;
-class SequencedTaskRunner;
-} // namespace base
-
-namespace google_apis {
-class ResourceEntry;
-} // namespace google_apis
-
-namespace drive {
-
-class JobScheduler;
-class ResourceEntry;
-struct ClientContext;
-
-namespace internal {
-class FileCache;
-class ResourceMetadata;
-} // namespace internal
-
-namespace file_system {
-
-// This class encapsulates the drive Update function. It is responsible for
-// sending the request to the drive API, then updating the local state and
-// metadata to reflect the new state.
-class ContentUpdatePerformer {
- public:
- ContentUpdatePerformer(base::SequencedTaskRunner* blocking_task_runner,
- JobScheduler* scheduler,
- internal::ResourceMetadata* metadata,
- internal::FileCache* cache);
- ~ContentUpdatePerformer();
-
- // Updates a file by the given |local_id| on the Drive server by
- // uploading an updated version. Used for uploading dirty files. The file
- // should already be present in the cache.
- //
- // |callback| must not be null.
- void UpdateFileByLocalId(const std::string& local_id,
- const ClientContext& context,
- const FileOperationCallback& callback);
-
- struct LocalState;
-
- private:
- void UpdateFileAfterGetLocalState(const ClientContext& context,
- const FileOperationCallback& callback,
- const LocalState* local_state,
- FileError error);
-
- void UpdateFileAfterUpload(
- const FileOperationCallback& callback,
- const std::string& local_id,
- google_apis::GDataErrorCode error,
- scoped_ptr<google_apis::ResourceEntry> resource_entry);
-
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
- JobScheduler* scheduler_;
- internal::ResourceMetadata* metadata_;
- internal::FileCache* cache_;
-
- // 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<ContentUpdatePerformer> weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(ContentUpdatePerformer);
-};
-
-} // namespace file_system
-} // namespace drive
-
-#endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CONTENT_UPDATE_PERFORMER_H_
« no previous file with comments | « chrome/browser/chromeos/drive/job_scheduler.cc ('k') | chrome/browser/chromeos/drive/sync/content_update_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698