| OLD | NEW |
| 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 "extensions/browser/test_extensions_browser_client.h" | 5 #include "extensions/browser/test_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include "content/public/browser/browser_context.h" | 7 #include "content/public/browser/browser_context.h" |
| 8 #include "extensions/browser/app_sorting.h" | 8 #include "extensions/browser/app_sorting.h" |
| 9 | 9 |
| 10 using content::BrowserContext; | 10 using content::BrowserContext; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) { | 23 void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) { |
| 24 // If a context is provided it must be off-the-record. | 24 // If a context is provided it must be off-the-record. |
| 25 DCHECK(!context || context->IsOffTheRecord()); | 25 DCHECK(!context || context->IsOffTheRecord()); |
| 26 incognito_context_ = context; | 26 incognito_context_ = context; |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool TestExtensionsBrowserClient::IsShuttingDown() { return false; } | 29 bool TestExtensionsBrowserClient::IsShuttingDown() { return false; } |
| 30 | 30 |
| 31 bool TestExtensionsBrowserClient::AreExtensionsDisabled( | 31 bool TestExtensionsBrowserClient::AreExtensionsDisabled( |
| 32 const CommandLine& command_line, | 32 const base::CommandLine& command_line, |
| 33 BrowserContext* context) { | 33 BrowserContext* context) { |
| 34 return false; | 34 return false; |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool TestExtensionsBrowserClient::IsValidContext(BrowserContext* context) { | 37 bool TestExtensionsBrowserClient::IsValidContext(BrowserContext* context) { |
| 38 return context == main_context_ || | 38 return context == main_context_ || |
| 39 (incognito_context_ && context == incognito_context_); | 39 (incognito_context_ && context == incognito_context_); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool TestExtensionsBrowserClient::IsSameContext(BrowserContext* first, | 42 bool TestExtensionsBrowserClient::IsSameContext(BrowserContext* first, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 TestExtensionsBrowserClient::GetExtensionSystemFactory() { | 129 TestExtensionsBrowserClient::GetExtensionSystemFactory() { |
| 130 // Tests requiring an extension system should override this function. | 130 // Tests requiring an extension system should override this function. |
| 131 NOTREACHED(); | 131 NOTREACHED(); |
| 132 return NULL; | 132 return NULL; |
| 133 } | 133 } |
| 134 | 134 |
| 135 void TestExtensionsBrowserClient::RegisterExtensionFunctions( | 135 void TestExtensionsBrowserClient::RegisterExtensionFunctions( |
| 136 ExtensionFunctionRegistry* registry) const {} | 136 ExtensionFunctionRegistry* registry) const {} |
| 137 | 137 |
| 138 } // namespace extensions | 138 } // namespace extensions |
| OLD | NEW |