| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 // background pages. See http://crbug.com/116134. | 363 // background pages. See http://crbug.com/116134. |
| 364 if (is_hosted_app()) | 364 if (is_hosted_app()) |
| 365 return false; | 365 return false; |
| 366 | 366 |
| 367 return true; | 367 return true; |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool Extension::ShouldNotBeVisible() const { | 370 bool Extension::ShouldNotBeVisible() const { |
| 371 // Don't show component extensions because they are only extensions as an | 371 // Don't show component extensions because they are only extensions as an |
| 372 // implementation detail of Chrome. | 372 // implementation detail of Chrome. |
| 373 if ((location() == Manifest::COMPONENT || | 373 if (extensions::Manifest::IsComponentLocation(location()) && |
| 374 location() == Manifest::EXTERNAL_COMPONENT) && | |
| 375 !CommandLine::ForCurrentProcess()->HasSwitch( | 374 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 376 switches::kShowComponentExtensionOptions)) { | 375 switches::kShowComponentExtensionOptions)) { |
| 377 return true; | 376 return true; |
| 378 } | 377 } |
| 379 | 378 |
| 380 // Always show unpacked extensions and apps. | 379 // Always show unpacked extensions and apps. |
| 381 if (Manifest::IsUnpackedLocation(location())) | 380 if (Manifest::IsUnpackedLocation(location())) |
| 382 return false; | 381 return false; |
| 383 | 382 |
| 384 // Don't show apps that aren't visible in either launcher or ntp. | 383 // Don't show apps that aren't visible in either launcher or ntp. |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 789 |
| 791 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 790 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 792 const Extension* extension, | 791 const Extension* extension, |
| 793 const PermissionSet* permissions, | 792 const PermissionSet* permissions, |
| 794 Reason reason) | 793 Reason reason) |
| 795 : reason(reason), | 794 : reason(reason), |
| 796 extension(extension), | 795 extension(extension), |
| 797 permissions(permissions) {} | 796 permissions(permissions) {} |
| 798 | 797 |
| 799 } // namespace extensions | 798 } // namespace extensions |
| OLD | NEW |