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 <set> | 9 #include <set> |
9 #include <string> | 10 #include <string> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/containers/scoped_ptr_map.h" | |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "components/keyed_service/core/keyed_service.h" | 16 #include "components/keyed_service/core/keyed_service.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
19 | 19 |
20 class Profile; | 20 class Profile; |
21 class SavedFilesServiceUnitTest; | 21 class SavedFilesServiceUnitTest; |
22 FORWARD_DECLARE_TEST(SavedFilesServiceUnitTest, RetainTwoFilesTest); | 22 FORWARD_DECLARE_TEST(SavedFilesServiceUnitTest, RetainTwoFilesTest); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 SavedFiles* GetOrInsert(const std::string& extension_id); | 120 SavedFiles* GetOrInsert(const std::string& extension_id); |
121 | 121 |
122 // Clears the SavedFiles for |extension_id|. | 122 // Clears the SavedFiles for |extension_id|. |
123 void Clear(const std::string& extension_id); | 123 void Clear(const std::string& extension_id); |
124 | 124 |
125 static void SetMaxSequenceNumberForTest(int max_value); | 125 static void SetMaxSequenceNumberForTest(int max_value); |
126 static void ClearMaxSequenceNumberForTest(); | 126 static void ClearMaxSequenceNumberForTest(); |
127 static void SetLruSizeForTest(int size); | 127 static void SetLruSizeForTest(int size); |
128 static void ClearLruSizeForTest(); | 128 static void ClearLruSizeForTest(); |
129 | 129 |
130 base::ScopedPtrMap<std::string, scoped_ptr<SavedFiles>> | 130 std::map<std::string, scoped_ptr<SavedFiles>> extension_id_to_saved_files_; |
131 extension_id_to_saved_files_; | |
132 content::NotificationRegistrar registrar_; | 131 content::NotificationRegistrar registrar_; |
133 Profile* profile_; | 132 Profile* profile_; |
134 | 133 |
135 DISALLOW_COPY_AND_ASSIGN(SavedFilesService); | 134 DISALLOW_COPY_AND_ASSIGN(SavedFilesService); |
136 }; | 135 }; |
137 | 136 |
138 } // namespace apps | 137 } // namespace apps |
139 | 138 |
140 #endif // APPS_SAVED_FILES_SERVICE_H_ | 139 #endif // APPS_SAVED_FILES_SERVICE_H_ |
OLD | NEW |