OLD | NEW |
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 #include "chrome/browser/extensions/api/management/management_api.h" | 5 #include "chrome/browser/extensions/api/management/management_api.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 718 |
719 void ManagementAPI::Shutdown() { | 719 void ManagementAPI::Shutdown() { |
720 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); | 720 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); |
721 } | 721 } |
722 | 722 |
723 static base::LazyInstance<ProfileKeyedAPIFactory<ManagementAPI> > | 723 static base::LazyInstance<ProfileKeyedAPIFactory<ManagementAPI> > |
724 g_factory = LAZY_INSTANCE_INITIALIZER; | 724 g_factory = LAZY_INSTANCE_INITIALIZER; |
725 | 725 |
726 // static | 726 // static |
727 ProfileKeyedAPIFactory<ManagementAPI>* ManagementAPI::GetFactoryInstance() { | 727 ProfileKeyedAPIFactory<ManagementAPI>* ManagementAPI::GetFactoryInstance() { |
728 return &g_factory.Get(); | 728 return g_factory.Pointer(); |
729 } | 729 } |
730 | 730 |
731 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 731 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
732 management_event_router_.reset(new ManagementEventRouter(profile_)); | 732 management_event_router_.reset(new ManagementEventRouter(profile_)); |
733 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); | 733 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); |
734 } | 734 } |
735 | 735 |
736 } // namespace extensions | 736 } // namespace extensions |
OLD | NEW |