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

Unified Diff: apps/saved_files_service_delegate_impl.h

Issue 2934143002: Move chrome.fileSystem implementation to //extensions (Closed)
Patch Set: devlin Created 3 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: apps/saved_files_service_delegate_impl.h
diff --git a/apps/saved_files_service_delegate_impl.h b/apps/saved_files_service_delegate_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..400ecbd75883cf0e2714a40837a32880ce47ec10
--- /dev/null
+++ b/apps/saved_files_service_delegate_impl.h
@@ -0,0 +1,48 @@
+// Copyright 2017 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 APPS_SAVED_FILES_SERVICE_DELEGATE_IMPL_H_
+#define APPS_SAVED_FILES_SERVICE_DELEGATE_IMPL_H_
+
+#include "extensions/browser/api/file_system/saved_files_service_delegate.h"
+
+#include <string>
+
+#include "base/macros.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace apps {
+
+class SavedFilesService;
+
+// Concrete implementation that just forwards calls to the SavedFilesService.
+class SavedFilesServiceDelegateImpl
+ : public extensions::file_system_api::SavedFilesServiceDelegate {
+ public:
+ SavedFilesServiceDelegateImpl(content::BrowserContext* browser_context);
+ ~SavedFilesServiceDelegateImpl() override;
+
+ // extensions::file_system_api::SavedFileServiceDelegate:
+ bool IsRegistered(const std::string& extension_id,
+ const std::string& id) override;
+ void RegisterFileEntry(const std::string& extension_id,
+ const File& file) override;
+ bool GetRegisteredFileInfo(const std::string& extension_id,
+ const std::string& id,
+ File* file) override;
+ void EnqueueFileEntry(const std::string& extension_id,
+ const std::string& id) override;
+
+ private:
+ SavedFilesService* saved_files_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(SavedFilesServiceDelegateImpl);
+};
+
+} // namespace apps
+
+#endif // APPS_SAVED_FILES_SERVICE_DELEGATE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698