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

Side by Side Diff: extensions/browser/api/declarative/rules_registry.h

Issue 1902873002: Convert //extensions/browser/api 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DECLARATIVE_RULES_REGISTRY_H__ 5 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_H__
6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_H__ 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_H__
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <set> 12 #include <set>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
16 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
17 #include "base/macros.h" 18 #include "base/macros.h"
18 #include "base/memory/linked_ptr.h" 19 #include "base/memory/linked_ptr.h"
19 #include "base/memory/scoped_ptr.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/notification_observer.h" 22 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
24 #include "extensions/common/api/events.h" 24 #include "extensions/common/api/events.h"
25 #include "extensions/common/one_shot_event.h" 25 #include "extensions/common/one_shot_event.h"
26 26
27 namespace content { 27 namespace content {
28 class BrowserContext; 28 class BrowserContext;
29 } 29 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // Set |remove_manifest_rules| to true if |manifest_rules_| should be cleared 217 // Set |remove_manifest_rules| to true if |manifest_rules_| should be cleared
218 // along with |rules_|. 218 // along with |rules_|.
219 std::string RemoveAllRulesNoStoreUpdate(const std::string& extension_id, 219 std::string RemoveAllRulesNoStoreUpdate(const std::string& extension_id,
220 bool remove_manifest_rules); 220 bool remove_manifest_rules);
221 221
222 void MarkReady(base::Time storage_init_time); 222 void MarkReady(base::Time storage_init_time);
223 223
224 // Deserialize the rules from the given Value object and add them to the 224 // Deserialize the rules from the given Value object and add them to the
225 // RulesRegistry. 225 // RulesRegistry.
226 void DeserializeAndAddRules(const std::string& extension_id, 226 void DeserializeAndAddRules(const std::string& extension_id,
227 scoped_ptr<base::Value> rules); 227 std::unique_ptr<base::Value> rules);
228 228
229 // Reports an internal error with the specified params to the extensions 229 // Reports an internal error with the specified params to the extensions
230 // client. 230 // client.
231 void ReportInternalError(const std::string& extension_id, 231 void ReportInternalError(const std::string& extension_id,
232 const std::string& error); 232 const std::string& error);
233 233
234 // The context to which this rules registry belongs. 234 // The context to which this rules registry belongs.
235 content::BrowserContext* browser_context_; 235 content::BrowserContext* browser_context_;
236 236
237 // The ID of the thread on which the rules registry lives. 237 // The ID of the thread on which the rules registry lives.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 base::WeakPtr<RulesCacheDelegate> cache_delegate_; 295 base::WeakPtr<RulesCacheDelegate> cache_delegate_;
296 296
297 base::WeakPtrFactory<RulesRegistry> weak_ptr_factory_; 297 base::WeakPtrFactory<RulesRegistry> weak_ptr_factory_;
298 298
299 DISALLOW_COPY_AND_ASSIGN(RulesRegistry); 299 DISALLOW_COPY_AND_ASSIGN(RulesRegistry);
300 }; 300 };
301 301
302 } // namespace extensions 302 } // namespace extensions
303 303
304 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_H__ 304 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_H__
OLDNEW
« no previous file with comments | « extensions/browser/api/declarative/rules_cache_delegate.cc ('k') | extensions/browser/api/declarative/rules_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698