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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const int Extension::kIconSizes[] = { | 92 const int Extension::kIconSizes[] = { |
93 EXTENSION_ICON_LARGE, | 93 EXTENSION_ICON_LARGE, |
94 EXTENSION_ICON_MEDIUM, | 94 EXTENSION_ICON_MEDIUM, |
95 EXTENSION_ICON_SMALL, | 95 EXTENSION_ICON_SMALL, |
96 EXTENSION_ICON_BITTY | 96 EXTENSION_ICON_BITTY |
97 }; | 97 }; |
98 | 98 |
99 const int Extension::kPageActionIconMaxSize = 19; | 99 const int Extension::kPageActionIconMaxSize = 19; |
100 const int Extension::kBrowserActionIconMaxSize = 19; | 100 const int Extension::kBrowserActionIconMaxSize = 19; |
101 | 101 |
| 102 const char* Extension::kTabPermission = "tabs"; |
| 103 const char* Extension::kBookmarkPermission = "bookmarks"; |
| 104 |
102 const char* Extension::kPermissionNames[] = { | 105 const char* Extension::kPermissionNames[] = { |
103 "tabs", | 106 Extension::kTabPermission, |
104 "bookmarks", | 107 Extension::kBookmarkPermission, |
105 }; | 108 }; |
106 const size_t Extension::kNumPermissions = | 109 const size_t Extension::kNumPermissions = |
107 arraysize(Extension::kPermissionNames); | 110 arraysize(Extension::kPermissionNames); |
108 | 111 |
109 Extension::~Extension() { | 112 Extension::~Extension() { |
110 } | 113 } |
111 | 114 |
112 const std::string Extension::VersionString() const { | 115 const std::string Extension::VersionString() const { |
113 return version_->GetString(); | 116 return version_->GetString(); |
114 } | 117 } |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 UserScript::PatternList::const_iterator pattern = | 1174 UserScript::PatternList::const_iterator pattern = |
1172 content_script->url_patterns().begin(); | 1175 content_script->url_patterns().begin(); |
1173 for (; pattern != content_script->url_patterns().end(); ++pattern) { | 1176 for (; pattern != content_script->url_patterns().end(); ++pattern) { |
1174 if (pattern->match_subdomains() && pattern->host().empty()) | 1177 if (pattern->match_subdomains() && pattern->host().empty()) |
1175 return true; | 1178 return true; |
1176 } | 1179 } |
1177 } | 1180 } |
1178 | 1181 |
1179 return false; | 1182 return false; |
1180 } | 1183 } |
OLD | NEW |