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

Side by Side Diff: apps/saved_files_service.h

Issue 1851373002: convert //apps to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « apps/launcher.cc ('k') | apps/saved_files_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set> 10 #include <set>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
14 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.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);
23 FORWARD_DECLARE_TEST(SavedFilesServiceUnitTest, EvictionTest); 23 FORWARD_DECLARE_TEST(SavedFilesServiceUnitTest, EvictionTest);
24 FORWARD_DECLARE_TEST(SavedFilesServiceUnitTest, SequenceNumberCompactionTest); 24 FORWARD_DECLARE_TEST(SavedFilesServiceUnitTest, SequenceNumberCompactionTest);
25 25
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::map<std::string, scoped_ptr<SavedFiles>> extension_id_to_saved_files_; 130 std::map<std::string, std::unique_ptr<SavedFiles>>
131 extension_id_to_saved_files_;
131 content::NotificationRegistrar registrar_; 132 content::NotificationRegistrar registrar_;
132 Profile* profile_; 133 Profile* profile_;
133 134
134 DISALLOW_COPY_AND_ASSIGN(SavedFilesService); 135 DISALLOW_COPY_AND_ASSIGN(SavedFilesService);
135 }; 136 };
136 137
137 } // namespace apps 138 } // namespace apps
138 139
139 #endif // APPS_SAVED_FILES_SERVICE_H_ 140 #endif // APPS_SAVED_FILES_SERVICE_H_
OLDNEW
« no previous file with comments | « apps/launcher.cc ('k') | apps/saved_files_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698