| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef APPS_SAVED_FILES_SERVICE_H_ | 5 #ifndef APPS_SAVED_FILES_SERVICE_H_ |
| 6 #define APPS_SAVED_FILES_SERVICE_H_ | 6 #define APPS_SAVED_FILES_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 std::vector<SavedFileEntry> GetAllFileEntries( | 94 std::vector<SavedFileEntry> GetAllFileEntries( |
| 95 const std::string& extension_id); | 95 const std::string& extension_id); |
| 96 | 96 |
| 97 // Clears all retained files if the app does not have the | 97 // Clears all retained files if the app does not have the |
| 98 // fileSystem.retainEntries permission. | 98 // fileSystem.retainEntries permission. |
| 99 void ClearQueueIfNoRetainPermission(const extensions::Extension* extension); | 99 void ClearQueueIfNoRetainPermission(const extensions::Extension* extension); |
| 100 | 100 |
| 101 // Clears all retained files. | 101 // Clears all retained files. |
| 102 void ClearQueue(const extensions::Extension* extension); | 102 void ClearQueue(const extensions::Extension* extension); |
| 103 | 103 |
| 104 // Called to notify that the application has begun to exit. |
| 105 void OnApplicationTerminating(); |
| 106 |
| 104 private: | 107 private: |
| 105 FRIEND_TEST_ALL_PREFIXES(::SavedFilesServiceUnitTest, RetainTwoFilesTest); | 108 FRIEND_TEST_ALL_PREFIXES(::SavedFilesServiceUnitTest, RetainTwoFilesTest); |
| 106 FRIEND_TEST_ALL_PREFIXES(::SavedFilesServiceUnitTest, EvictionTest); | 109 FRIEND_TEST_ALL_PREFIXES(::SavedFilesServiceUnitTest, EvictionTest); |
| 107 FRIEND_TEST_ALL_PREFIXES(::SavedFilesServiceUnitTest, | 110 FRIEND_TEST_ALL_PREFIXES(::SavedFilesServiceUnitTest, |
| 108 SequenceNumberCompactionTest); | 111 SequenceNumberCompactionTest); |
| 109 friend class ::SavedFilesServiceUnitTest; | 112 friend class ::SavedFilesServiceUnitTest; |
| 110 | 113 |
| 111 // A container for the registered files for an app. | 114 // A container for the registered files for an app. |
| 112 class SavedFiles; | 115 class SavedFiles; |
| 113 | 116 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 134 extension_id_to_saved_files_; | 137 extension_id_to_saved_files_; |
| 135 content::NotificationRegistrar registrar_; | 138 content::NotificationRegistrar registrar_; |
| 136 content::BrowserContext* context_; | 139 content::BrowserContext* context_; |
| 137 | 140 |
| 138 DISALLOW_COPY_AND_ASSIGN(SavedFilesService); | 141 DISALLOW_COPY_AND_ASSIGN(SavedFilesService); |
| 139 }; | 142 }; |
| 140 | 143 |
| 141 } // namespace apps | 144 } // namespace apps |
| 142 | 145 |
| 143 #endif // APPS_SAVED_FILES_SERVICE_H_ | 146 #endif // APPS_SAVED_FILES_SERVICE_H_ |
| OLD | NEW |