| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "extensions/common/extension.h" | 5 #include "extensions/common/extension.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // background pages. See http://crbug.com/116134. | 361 // background pages. See http://crbug.com/116134. |
| 362 if (is_hosted_app()) | 362 if (is_hosted_app()) |
| 363 return false; | 363 return false; |
| 364 | 364 |
| 365 return true; | 365 return true; |
| 366 } | 366 } |
| 367 | 367 |
| 368 bool Extension::ShouldNotBeVisible() const { | 368 bool Extension::ShouldNotBeVisible() const { |
| 369 // Don't show component extensions because they are only extensions as an | 369 // Don't show component extensions because they are only extensions as an |
| 370 // implementation detail of Chrome. | 370 // implementation detail of Chrome. |
| 371 if (location() == Manifest::COMPONENT && | 371 if ((location() == Manifest::COMPONENT || |
| 372 location() == Manifest::EXTERNAL_COMPONENT) && |
| 372 !CommandLine::ForCurrentProcess()->HasSwitch( | 373 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 373 switches::kShowComponentExtensionOptions)) { | 374 switches::kShowComponentExtensionOptions)) { |
| 374 return true; | 375 return true; |
| 375 } | 376 } |
| 376 | 377 |
| 377 // Always show unpacked extensions and apps. | 378 // Always show unpacked extensions and apps. |
| 378 if (Manifest::IsUnpackedLocation(location())) | 379 if (Manifest::IsUnpackedLocation(location())) |
| 379 return false; | 380 return false; |
| 380 | 381 |
| 381 // Don't show apps that aren't visible in either launcher or ntp. | 382 // Don't show apps that aren't visible in either launcher or ntp. |
| 382 if (is_app() && !ShouldDisplayInAppLauncher() && !ShouldDisplayInNewTabPage()) | 383 if (is_app() && !ShouldDisplayInAppLauncher() && !ShouldDisplayInNewTabPage()) |
| 383 return true; | 384 return true; |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 784 |
| 784 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 785 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 785 const Extension* extension, | 786 const Extension* extension, |
| 786 const PermissionSet* permissions, | 787 const PermissionSet* permissions, |
| 787 Reason reason) | 788 Reason reason) |
| 788 : reason(reason), | 789 : reason(reason), |
| 789 extension(extension), | 790 extension(extension), |
| 790 permissions(permissions) {} | 791 permissions(permissions) {} |
| 791 | 792 |
| 792 } // namespace extensions | 793 } // namespace extensions |
| OLD | NEW |