| OLD | NEW |
| 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 #include "chrome/browser/extensions/extension_toolbar_model_factory.h" | 5 #include "chrome/browser/extensions/extension_toolbar_model_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_prefs.h" | |
| 8 #include "chrome/browser/extensions/extension_prefs_factory.h" | |
| 9 #include "chrome/browser/extensions/extension_toolbar_model.h" | 7 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 10 #include "chrome/browser/profiles/incognito_helpers.h" | 8 #include "chrome/browser/profiles/incognito_helpers.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 12 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 11 #include "extensions/browser/extension_prefs.h" |
| 12 #include "extensions/browser/extension_prefs_factory.h" |
| 13 | 13 |
| 14 // static | 14 // static |
| 15 ExtensionToolbarModel* ExtensionToolbarModelFactory::GetForProfile( | 15 ExtensionToolbarModel* ExtensionToolbarModelFactory::GetForProfile( |
| 16 Profile* profile) { | 16 Profile* profile) { |
| 17 return static_cast<ExtensionToolbarModel*>( | 17 return static_cast<ExtensionToolbarModel*>( |
| 18 GetInstance()->GetServiceForBrowserContext(profile, true)); | 18 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 19 } | 19 } |
| 20 | 20 |
| 21 // static | 21 // static |
| 22 ExtensionToolbarModelFactory* ExtensionToolbarModelFactory::GetInstance() { | 22 ExtensionToolbarModelFactory* ExtensionToolbarModelFactory::GetInstance() { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 45 return chrome::GetBrowserContextRedirectedInIncognito(context); | 45 return chrome::GetBrowserContextRedirectedInIncognito(context); |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool ExtensionToolbarModelFactory::ServiceIsCreatedWithBrowserContext() const { | 48 bool ExtensionToolbarModelFactory::ServiceIsCreatedWithBrowserContext() const { |
| 49 return true; | 49 return true; |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool ExtensionToolbarModelFactory::ServiceIsNULLWhileTesting() const { | 52 bool ExtensionToolbarModelFactory::ServiceIsNULLWhileTesting() const { |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| OLD | NEW |