OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return false; | 61 return false; |
62 } | 62 } |
63 | 63 |
64 } // namespace | 64 } // namespace |
65 | 65 |
66 // static | 66 // static |
67 int Extension::id_counter_ = 0; | 67 int Extension::id_counter_ = 0; |
68 | 68 |
69 const char Extension::kManifestFilename[] = "manifest.json"; | 69 const char Extension::kManifestFilename[] = "manifest.json"; |
70 const char Extension::kLocaleFolder[] = "_locales"; | 70 const char Extension::kLocaleFolder[] = "_locales"; |
71 const char Extension::kMessagesFilename[] = "messages"; | 71 const char Extension::kMessagesFilename[] = "messages.json"; |
72 | 72 |
73 // A list of all the keys allowed by themes. | 73 // A list of all the keys allowed by themes. |
74 static const wchar_t* kValidThemeKeys[] = { | 74 static const wchar_t* kValidThemeKeys[] = { |
75 keys::kDescription, | 75 keys::kDescription, |
76 keys::kName, | 76 keys::kName, |
77 keys::kPublicKey, | 77 keys::kPublicKey, |
78 keys::kSignature, | 78 keys::kSignature, |
79 keys::kTheme, | 79 keys::kTheme, |
80 keys::kVersion, | 80 keys::kVersion, |
81 keys::kUpdateURL | 81 keys::kUpdateURL |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 UserScript::PatternList::const_iterator pattern = | 1117 UserScript::PatternList::const_iterator pattern = |
1118 content_script->url_patterns().begin(); | 1118 content_script->url_patterns().begin(); |
1119 for (; pattern != content_script->url_patterns().end(); ++pattern) { | 1119 for (; pattern != content_script->url_patterns().end(); ++pattern) { |
1120 if (pattern->match_subdomains() && pattern->host().empty()) | 1120 if (pattern->match_subdomains() && pattern->host().empty()) |
1121 return true; | 1121 return true; |
1122 } | 1122 } |
1123 } | 1123 } |
1124 | 1124 |
1125 return false; | 1125 return false; |
1126 } | 1126 } |
OLD | NEW |