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

Side by Side Diff: apps/saved_files_service_delegate_impl.cc

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "apps/saved_files_service_delegate_impl.h"
6
7 #include "apps/saved_files_service.h"
8 #include "content/public/browser/browser_context.h"
9
10 namespace apps {
11
12 SavedFilesServiceDelegateImpl::SavedFilesServiceDelegateImpl(
13 content::BrowserContext* browser_context) {
14 saved_files_service_ = SavedFilesService::Get(browser_context);
15 }
16
17 SavedFilesServiceDelegateImpl::~SavedFilesServiceDelegateImpl() {}
18
19 bool SavedFilesServiceDelegateImpl::IsRegistered(
20 const std::string& extension_id,
21 const std::string& id) {
22 return saved_files_service_->IsRegistered(extension_id, id);
23 }
24
25 void SavedFilesServiceDelegateImpl::RegisterFileEntry(
26 const std::string& extension_id,
27 const File& file) {
28 saved_files_service_->RegisterFileEntry(extension_id, file.id, file.path,
29 file.is_directory);
30 }
31
32 bool SavedFilesServiceDelegateImpl::GetRegisteredFileInfo(
33 const std::string& extension_id,
34 const std::string& id,
35 File* file) {
36 const SavedFileEntry* entry =
37 saved_files_service_->GetFileEntry(extension_id, id);
38 if (!entry)
39 return false;
40 file->id = entry->id;
41 file->path = entry->path;
42 file->is_directory = entry->is_directory;
43 return true;
44 }
45
46 void SavedFilesServiceDelegateImpl::EnqueueFileEntry(
47 const std::string& extension_id,
48 const std::string& id) {
49 saved_files_service_->EnqueueFileEntry(extension_id, id);
50 }
51
52 } // namespace apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698