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

Side by Side Diff: athena/extensions/shell/extensions_delegate_impl.cc

Issue 653563004: NULL -> nullptr under athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 2 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 #include "athena/extensions/public/extensions_delegate.h" 5 #include "athena/extensions/public/extensions_delegate.h"
6 6
7 #include "athena/extensions/shell/athena_shell_app_window_client.h" 7 #include "athena/extensions/shell/athena_shell_app_window_client.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "extensions/browser/install/extension_install_ui.h" 9 #include "extensions/browser/install/extension_install_ui.h"
10 #include "extensions/common/extension_set.h" 10 #include "extensions/common/extension_set.h"
11 #include "extensions/shell/browser/shell_extension_system.h" 11 #include "extensions/shell/browser/shell_extension_system.h"
12 12
13 namespace athena { 13 namespace athena {
14 namespace { 14 namespace {
15 15
16 class ShellExtensionsDelegate : public ExtensionsDelegate { 16 class ShellExtensionsDelegate : public ExtensionsDelegate {
17 public: 17 public:
18 explicit ShellExtensionsDelegate(content::BrowserContext* context) 18 explicit ShellExtensionsDelegate(content::BrowserContext* context)
19 : context_(context), 19 : context_(context),
20 extension_system_(static_cast<extensions::ShellExtensionSystem*>( 20 extension_system_(static_cast<extensions::ShellExtensionSystem*>(
21 extensions::ExtensionSystem::Get(context))) { 21 extensions::ExtensionSystem::Get(context))) {
22 extensions::AppWindowClient::Set(&app_window_client_); 22 extensions::AppWindowClient::Set(&app_window_client_);
23 } 23 }
24 24
25 virtual ~ShellExtensionsDelegate() { extensions::AppWindowClient::Set(NULL); } 25 virtual ~ShellExtensionsDelegate() {
26 extensions::AppWindowClient::Set(nullptr);
27 }
26 28
27 private: 29 private:
28 // ExtensionsDelegate: 30 // ExtensionsDelegate:
29 virtual content::BrowserContext* GetBrowserContext() const override { 31 virtual content::BrowserContext* GetBrowserContext() const override {
30 return context_; 32 return context_;
31 } 33 }
32 virtual const extensions::ExtensionSet& GetInstalledExtensions() override { 34 virtual const extensions::ExtensionSet& GetInstalledExtensions() override {
33 shell_extensions_.Clear(); 35 shell_extensions_.Clear();
34 if (extension_system_->extension().get()) 36 if (extension_system_->extension().get())
35 shell_extensions_.Insert(extension_system_->extension()); 37 shell_extensions_.Insert(extension_system_->extension());
(...skipping 22 matching lines...) Expand all
58 60
59 } // namespace 61 } // namespace
60 62
61 // static 63 // static
62 void ExtensionsDelegate::CreateExtensionsDelegate( 64 void ExtensionsDelegate::CreateExtensionsDelegate(
63 content::BrowserContext* context) { 65 content::BrowserContext* context) {
64 new ShellExtensionsDelegate(context); 66 new ShellExtensionsDelegate(context);
65 } 67 }
66 68
67 } // namespace athena 69 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/shell/athena_shell_app_delegate.cc ('k') | athena/extensions/shell/shell_search_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698