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

Side by Side Diff: extensions/browser/api/storage/storage_frontend.h

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_STORAGE_STORAGE_FRONTEND_H_ 5 #ifndef EXTENSIONS_BROWSER_API_STORAGE_STORAGE_FRONTEND_H_
6 #define EXTENSIONS_BROWSER_API_STORAGE_STORAGE_FRONTEND_H_ 6 #define EXTENSIONS_BROWSER_API_STORAGE_STORAGE_FRONTEND_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 namespace extensions { 23 namespace extensions {
24 24
25 // The component of the Storage API which runs on the UI thread. 25 // The component of the Storage API which runs on the UI thread.
26 class StorageFrontend : public BrowserContextKeyedAPI { 26 class StorageFrontend : public BrowserContextKeyedAPI {
27 public: 27 public:
28 // Returns the current instance for |context|. 28 // Returns the current instance for |context|.
29 static StorageFrontend* Get(content::BrowserContext* context); 29 static StorageFrontend* Get(content::BrowserContext* context);
30 30
31 // Creates with a specific |storage_factory|. Caller owns the object. 31 // Creates with a specific |storage_factory|.
32 static StorageFrontend* CreateForTesting( 32 static scoped_ptr<StorageFrontend> CreateForTesting(
33 const scoped_refptr<SettingsStorageFactory>& storage_factory, 33 const scoped_refptr<SettingsStorageFactory>& storage_factory,
34 content::BrowserContext* context); 34 content::BrowserContext* context);
35 35
36 // Public so tests can create and delete their own instances. 36 // Public so tests can create and delete their own instances.
37 ~StorageFrontend() override; 37 ~StorageFrontend() override;
38 38
39 // Returns the value store cache for |settings_namespace|. 39 // Returns the value store cache for |settings_namespace|.
40 ValueStoreCache* GetValueStoreCache( 40 ValueStoreCache* GetValueStoreCache(
41 settings_namespace::Namespace settings_namespace) const; 41 settings_namespace::Namespace settings_namespace) const;
42 42
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Maps a known namespace to its corresponding ValueStoreCache. The caches 90 // Maps a known namespace to its corresponding ValueStoreCache. The caches
91 // are owned by this object. 91 // are owned by this object.
92 CacheMap caches_; 92 CacheMap caches_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(StorageFrontend); 94 DISALLOW_COPY_AND_ASSIGN(StorageFrontend);
95 }; 95 };
96 96
97 } // namespace extensions 97 } // namespace extensions
98 98
99 #endif // EXTENSIONS_BROWSER_API_STORAGE_STORAGE_FRONTEND_H_ 99 #endif // EXTENSIONS_BROWSER_API_STORAGE_STORAGE_FRONTEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698