| 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/renderer/extensions/renderer_permissions_policy_delegate.h" | 5 #include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/common/extensions/extension_constants.h" | 9 #include "chrome/common/extensions/extension_constants.h" |
| 10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return true; | 39 return true; |
| 40 } | 40 } |
| 41 | 41 |
| 42 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 42 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 43 if (command_line->HasSwitch(::switches::kSigninProcess)) { | 43 if (command_line->HasSwitch(::switches::kSigninProcess)) { |
| 44 if (error) | 44 if (error) |
| 45 *error = errors::kCannotScriptSigninPage; | 45 *error = errors::kCannotScriptSigninPage; |
| 46 return false; | 46 return false; |
| 47 } | 47 } |
| 48 | 48 |
| 49 // TODO(thestig): Remove scaffolding once this file no longer builds with |
| 50 // extensions disabled. |
| 51 #if defined(ENABLE_EXTENSIONS) |
| 49 if (dispatcher_->IsExtensionActive(extensions::kWebStoreAppId)) { | 52 if (dispatcher_->IsExtensionActive(extensions::kWebStoreAppId)) { |
| 50 if (error) | 53 if (error) |
| 51 *error = errors::kCannotScriptGallery; | 54 *error = errors::kCannotScriptGallery; |
| 52 return false; | 55 return false; |
| 53 } | 56 } |
| 57 #endif |
| 54 | 58 |
| 55 return true; | 59 return true; |
| 56 } | 60 } |
| 57 | 61 |
| 58 } // namespace extensions | 62 } // namespace extensions |
| OLD | NEW |