OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/common/extensions/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 std::string launch_container_string; | 662 std::string launch_container_string; |
663 if (!temp->GetAsString(&launch_container_string)) { | 663 if (!temp->GetAsString(&launch_container_string)) { |
664 *error = errors::kInvalidLaunchContainer; | 664 *error = errors::kInvalidLaunchContainer; |
665 return false; | 665 return false; |
666 } | 666 } |
667 | 667 |
668 if (launch_container_string == values::kLaunchContainerPanel) { | 668 if (launch_container_string == values::kLaunchContainerPanel) { |
669 launch_container_ = LAUNCH_PANEL; | 669 launch_container_ = LAUNCH_PANEL; |
670 } else if (launch_container_string == values::kLaunchContainerTab) { | 670 } else if (launch_container_string == values::kLaunchContainerTab) { |
671 launch_container_ = LAUNCH_TAB; | 671 launch_container_ = LAUNCH_TAB; |
672 } else if (launch_container_string == values::kLaunchContainerWindow) { | |
673 launch_container_ = LAUNCH_WINDOW; | |
674 } else { | 672 } else { |
675 *error = errors::kInvalidLaunchContainer; | 673 *error = errors::kInvalidLaunchContainer; |
676 return false; | 674 return false; |
677 } | 675 } |
678 | 676 |
679 // Validate the container width if present. | 677 // Validate the container width if present. |
680 if (manifest->Get(keys::kLaunchWidth, &temp)) { | 678 if (manifest->Get(keys::kLaunchWidth, &temp)) { |
681 if (launch_container_ != LAUNCH_PANEL && | 679 if (launch_container_ != LAUNCH_PANEL && |
682 launch_container_ != LAUNCH_WINDOW) { | 680 launch_container_ != LAUNCH_WINDOW) { |
683 *error = errors::kInvalidLaunchWidthContainer; | 681 *error = errors::kInvalidLaunchWidthContainer; |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 } else { | 1765 } else { |
1768 return false; | 1766 return false; |
1769 } | 1767 } |
1770 } else { | 1768 } else { |
1771 return true; | 1769 return true; |
1772 } | 1770 } |
1773 } | 1771 } |
1774 } | 1772 } |
1775 return false; | 1773 return false; |
1776 } | 1774 } |
OLD | NEW |