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

Side by Side Diff: extensions/browser/test_extension_registry_observer.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_TEST_EXTENSION_REGISTRY_OBSERVER_H_ 5 #ifndef EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ 6 #define EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/scoped_observer.h" 12 #include "base/scoped_observer.h"
13 #include "extensions/browser/extension_registry_observer.h" 13 #include "extensions/browser/extension_registry_observer.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 class ExtensionRegistry; 16 class ExtensionRegistry;
17 17
18 // A helper class that listen for ExtensionRegistry notifications. 18 // A helper class that listen for ExtensionRegistry notifications.
19 class TestExtensionRegistryObserver : public ExtensionRegistryObserver { 19 class TestExtensionRegistryObserver : public ExtensionRegistryObserver {
20 public: 20 public:
21 // If |extension_id| is provided, listens only to events relating to that 21 // If |extension_id| is provided, listens only to events relating to that
(...skipping 20 matching lines...) Expand all
42 const std::string& old_name) override; 42 const std::string& old_name) override;
43 void OnExtensionUninstalled(content::BrowserContext* browser_context, 43 void OnExtensionUninstalled(content::BrowserContext* browser_context,
44 const Extension* extension, 44 const Extension* extension,
45 extensions::UninstallReason reason) override; 45 extensions::UninstallReason reason) override;
46 void OnExtensionLoaded(content::BrowserContext* browser_context, 46 void OnExtensionLoaded(content::BrowserContext* browser_context,
47 const Extension* extension) override; 47 const Extension* extension) override;
48 void OnExtensionUnloaded(content::BrowserContext* browser_context, 48 void OnExtensionUnloaded(content::BrowserContext* browser_context,
49 const Extension* extension, 49 const Extension* extension,
50 UnloadedExtensionInfo::Reason reason) override; 50 UnloadedExtensionInfo::Reason reason) override;
51 51
52 const Extension* Wait(scoped_ptr<Waiter>* waiter); 52 const Extension* Wait(std::unique_ptr<Waiter>* waiter);
53 53
54 scoped_ptr<Waiter> will_be_installed_waiter_; 54 std::unique_ptr<Waiter> will_be_installed_waiter_;
55 scoped_ptr<Waiter> uninstalled_waiter_; 55 std::unique_ptr<Waiter> uninstalled_waiter_;
56 scoped_ptr<Waiter> loaded_waiter_; 56 std::unique_ptr<Waiter> loaded_waiter_;
57 scoped_ptr<Waiter> unloaded_waiter_; 57 std::unique_ptr<Waiter> unloaded_waiter_;
58 58
59 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 59 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
60 extension_registry_observer_; 60 extension_registry_observer_;
61 61
62 std::string extension_id_; 62 std::string extension_id_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(TestExtensionRegistryObserver); 64 DISALLOW_COPY_AND_ASSIGN(TestExtensionRegistryObserver);
65 }; 65 };
66 66
67 } // namespace extensions 67 } // namespace extensions
68 68
69 #endif // EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ 69 #endif // EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_
OLDNEW
« no previous file with comments | « extensions/browser/state_store.cc ('k') | extensions/browser/test_extension_registry_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698