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

Side by Side Diff: extensions/browser/extension_pref_value_map.h

Issue 1909773002: Convert //extensions/browser from scoped_ptr 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
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_EXTENSION_PREF_VALUE_MAP_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_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 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "components/keyed_service/core/keyed_service.h" 15 #include "components/keyed_service/core/keyed_service.h"
16 #include "extensions/browser/extension_prefs_scope.h" 16 #include "extensions/browser/extension_prefs_scope.h"
17 17
18 class PrefValueMap; 18 class PrefValueMap;
19 19
20 namespace base { 20 namespace base {
21 class Time; 21 class Time;
22 class Value; 22 class Value;
23 } 23 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 void RemoveObserver(Observer* observer); 158 void RemoveObserver(Observer* observer);
159 159
160 const base::Value* GetEffectivePrefValue(const std::string& key, 160 const base::Value* GetEffectivePrefValue(const std::string& key,
161 bool incognito, 161 bool incognito,
162 bool* from_incognito) const; 162 bool* from_incognito) const;
163 163
164 private: 164 private:
165 struct ExtensionEntry; 165 struct ExtensionEntry;
166 166
167 typedef std::map<std::string, scoped_ptr<ExtensionEntry>> ExtensionEntryMap; 167 typedef std::map<std::string, std::unique_ptr<ExtensionEntry>>
168 ExtensionEntryMap;
168 169
169 const PrefValueMap* GetExtensionPrefValueMap( 170 const PrefValueMap* GetExtensionPrefValueMap(
170 const std::string& ext_id, 171 const std::string& ext_id,
171 extensions::ExtensionPrefsScope scope) const; 172 extensions::ExtensionPrefsScope scope) const;
172 173
173 PrefValueMap* GetExtensionPrefValueMap( 174 PrefValueMap* GetExtensionPrefValueMap(
174 const std::string& ext_id, 175 const std::string& ext_id,
175 extensions::ExtensionPrefsScope scope); 176 extensions::ExtensionPrefsScope scope);
176 177
177 // Returns all keys of pref values that are set by the extension of |entry|, 178 // Returns all keys of pref values that are set by the extension of |entry|,
(...skipping 24 matching lines...) Expand all
202 // being destroyed. In tests, it isn't called, so the notification must 203 // being destroyed. In tests, it isn't called, so the notification must
203 // be done in the destructor. This bit tracks whether it has been done yet. 204 // be done in the destructor. This bit tracks whether it has been done yet.
204 bool destroyed_; 205 bool destroyed_;
205 206
206 base::ObserverList<Observer, true> observers_; 207 base::ObserverList<Observer, true> observers_;
207 208
208 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefValueMap); 209 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefValueMap);
209 }; 210 };
210 211
211 #endif // EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_H_ 212 #endif // EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_message_filter.h ('k') | extensions/browser/extension_pref_value_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698