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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 if (Manifest::IsUnpackedLocation(location())) | 379 if (Manifest::IsUnpackedLocation(location())) |
380 return false; | 380 return false; |
381 | 381 |
382 // 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. |
383 if (is_app() && !ShouldDisplayInAppLauncher() && !ShouldDisplayInNewTabPage()) | 383 if (is_app() && !ShouldDisplayInAppLauncher() && !ShouldDisplayInNewTabPage()) |
384 return true; | 384 return true; |
385 | 385 |
386 return false; | 386 return false; |
387 } | 387 } |
388 | 388 |
| 389 bool Extension::IsDevModeExtension() const { |
| 390 return location() == Manifest::UNPACKED || |
| 391 location() == Manifest::COMMAND_LINE; |
| 392 } |
| 393 |
389 Extension::ManifestData* Extension::GetManifestData(const std::string& key) | 394 Extension::ManifestData* Extension::GetManifestData(const std::string& key) |
390 const { | 395 const { |
391 DCHECK(finished_parsing_manifest_ || thread_checker_.CalledOnValidThread()); | 396 DCHECK(finished_parsing_manifest_ || thread_checker_.CalledOnValidThread()); |
392 ManifestDataMap::const_iterator iter = manifest_data_.find(key); | 397 ManifestDataMap::const_iterator iter = manifest_data_.find(key); |
393 if (iter != manifest_data_.end()) | 398 if (iter != manifest_data_.end()) |
394 return iter->second.get(); | 399 return iter->second.get(); |
395 return NULL; | 400 return NULL; |
396 } | 401 } |
397 | 402 |
398 void Extension::SetManifestData(const std::string& key, | 403 void Extension::SetManifestData(const std::string& key, |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 | 789 |
785 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 790 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
786 const Extension* extension, | 791 const Extension* extension, |
787 const PermissionSet* permissions, | 792 const PermissionSet* permissions, |
788 Reason reason) | 793 Reason reason) |
789 : reason(reason), | 794 : reason(reason), |
790 extension(extension), | 795 extension(extension), |
791 permissions(permissions) {} | 796 permissions(permissions) {} |
792 | 797 |
793 } // namespace extensions | 798 } // namespace extensions |
OLD | NEW |