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 "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 : converted_from_user_script_(false), | 717 : converted_from_user_script_(false), |
718 is_theme_(false), | 718 is_theme_(false), |
719 web_content_enabled_(false), | 719 web_content_enabled_(false), |
720 launch_container_(LAUNCH_TAB), | 720 launch_container_(LAUNCH_TAB), |
721 launch_fullscreen_(false), | 721 launch_fullscreen_(false), |
722 background_page_ready_(false), | 722 background_page_ready_(false), |
723 being_upgraded_(false) { | 723 being_upgraded_(false) { |
724 DCHECK(path.IsAbsolute()); | 724 DCHECK(path.IsAbsolute()); |
725 | 725 |
726 apps_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch( | 726 apps_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch( |
727 switches::kEnableExtensionApps); | 727 switches::kEnableApps); |
728 location_ = INVALID; | 728 location_ = INVALID; |
729 | 729 |
730 #if defined(OS_WIN) | 730 #if defined(OS_WIN) |
731 // Normalize any drive letter to upper-case. We do this for consistency with | 731 // Normalize any drive letter to upper-case. We do this for consistency with |
732 // net_utils::FilePathToFileURL(), which does the same thing, to make string | 732 // net_utils::FilePathToFileURL(), which does the same thing, to make string |
733 // comparisons simpler. | 733 // comparisons simpler. |
734 std::wstring path_str = path.value(); | 734 std::wstring path_str = path.value(); |
735 if (path_str.size() >= 2 && path_str[0] >= L'a' && path_str[0] <= L'z' && | 735 if (path_str.size() >= 2 && path_str[0] >= L'a' && path_str[0] <= L'z' && |
736 path_str[1] == ':') | 736 path_str[1] == ':') |
737 path_str[0] += ('A' - 'a'); | 737 path_str[0] += ('A' - 'a'); |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 } else { | 1684 } else { |
1685 return false; | 1685 return false; |
1686 } | 1686 } |
1687 } else { | 1687 } else { |
1688 return true; | 1688 return true; |
1689 } | 1689 } |
1690 } | 1690 } |
1691 } | 1691 } |
1692 return false; | 1692 return false; |
1693 } | 1693 } |
OLD | NEW |