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

Side by Side Diff: chrome/browser/extensions/error_console/error_console.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 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 CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
6 #define CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 14 #include "base/observer_list.h"
14 #include "base/scoped_observer.h" 15 #include "base/scoped_observer.h"
15 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
16 #include "components/keyed_service/core/keyed_service.h" 17 #include "components/keyed_service/core/keyed_service.h"
17 #include "components/prefs/pref_change_registrar.h" 18 #include "components/prefs/pref_change_registrar.h"
18 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
20 #include "extensions/browser/error_map.h" 21 #include "extensions/browser/error_map.h"
21 #include "extensions/browser/extension_error.h" 22 #include "extensions/browser/extension_error.h"
22 #include "extensions/browser/extension_registry_observer.h" 23 #include "extensions/browser/extension_registry_observer.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool enabled); 81 bool enabled);
81 82
82 // Returns true if reporting for either manifest or runtime errors is enabled 83 // Returns true if reporting for either manifest or runtime errors is enabled
83 // for the extension with the given |extension_id|. 84 // for the extension with the given |extension_id|.
84 bool IsReportingEnabledForExtension(const std::string& extension_id) const; 85 bool IsReportingEnabledForExtension(const std::string& extension_id) const;
85 86
86 // Restore default reporting to the given extension. 87 // Restore default reporting to the given extension.
87 void UseDefaultReportingForExtension(const std::string& extension_id); 88 void UseDefaultReportingForExtension(const std::string& extension_id);
88 89
89 // Report an extension error, and add it to the list. 90 // Report an extension error, and add it to the list.
90 void ReportError(scoped_ptr<ExtensionError> error); 91 void ReportError(std::unique_ptr<ExtensionError> error);
91 92
92 // Removes errors from the map according to the given |filter|. 93 // Removes errors from the map according to the given |filter|.
93 void RemoveErrors(const ErrorMap::Filter& filter); 94 void RemoveErrors(const ErrorMap::Filter& filter);
94 95
95 // Get a collection of weak pointers to all errors relating to the extension 96 // Get a collection of weak pointers to all errors relating to the extension
96 // with the given |extension_id|. 97 // with the given |extension_id|.
97 const ErrorList& GetErrorsForExtension(const std::string& extension_id) const; 98 const ErrorList& GetErrorsForExtension(const std::string& extension_id) const;
98 99
99 // Add or remove observers of the ErrorConsole to be notified of any errors 100 // Add or remove observers of the ErrorConsole to be notified of any errors
100 // added. 101 // added.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 201 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
201 registry_observer_; 202 registry_observer_;
202 203
203 DISALLOW_COPY_AND_ASSIGN(ErrorConsole); 204 DISALLOW_COPY_AND_ASSIGN(ErrorConsole);
204 }; 205 };
205 206
206 } // namespace extensions 207 } // namespace extensions
207 208
208 #endif // CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 209 #endif // CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/display_info_provider_chromeos.cc ('k') | chrome/browser/extensions/error_console/error_console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698