| 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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // Expects base64 encoded |input| and formats into |output| including | 247 // Expects base64 encoded |input| and formats into |output| including |
| 248 // the appropriate header & footer. | 248 // the appropriate header & footer. |
| 249 static bool FormatPEMForFileOutput(const std::string input, | 249 static bool FormatPEMForFileOutput(const std::string input, |
| 250 std::string* output, bool is_public); | 250 std::string* output, bool is_public); |
| 251 | 251 |
| 252 // Determine whether |new_extension| has increased privileges compared to | 252 // Determine whether |new_extension| has increased privileges compared to |
| 253 // |old_extension|. | 253 // |old_extension|. |
| 254 static bool IsPrivilegeIncrease(const Extension* old_extension, | 254 static bool IsPrivilegeIncrease(const Extension* old_extension, |
| 255 const Extension* new_extension); | 255 const Extension* new_extension); |
| 256 | 256 |
| 257 // Determine whether the |extension| has increased privileges compared to |
| 258 // its previous |granted_apis| and |granted_hosts| permissions. |
| 259 static bool IsPrivilegeIncrease(const std::set<std::string>* granted_apis, |
| 260 const std::set<std::string>* granted_hosts, |
| 261 const Extension* extension); |
| 262 |
| 257 // Given an extension and icon size, read it if present and decode it into | 263 // Given an extension and icon size, read it if present and decode it into |
| 258 // result. In the browser process, this will DCHECK if not called on the | 264 // result. In the browser process, this will DCHECK if not called on the |
| 259 // file thread. To easily load extension images on the UI thread, see | 265 // file thread. To easily load extension images on the UI thread, see |
| 260 // ImageLoadingTracker. | 266 // ImageLoadingTracker. |
| 261 static void DecodeIcon(const Extension* extension, | 267 static void DecodeIcon(const Extension* extension, |
| 262 Icons icon_size, | 268 Icons icon_size, |
| 263 scoped_ptr<SkBitmap>* result); | 269 scoped_ptr<SkBitmap>* result); |
| 264 | 270 |
| 265 // Given an icon_path and icon size, read it if present and decode it into | 271 // Given an icon_path and icon size, read it if present and decode it into |
| 266 // result. In the browser process, this will DCHECK if not called on the | 272 // result. In the browser process, this will DCHECK if not called on the |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 std::set<std::string> extension_api_permissions; | 685 std::set<std::string> extension_api_permissions; |
| 680 // TODO(akalin): Once we have a unified ExtensionType, replace the | 686 // TODO(akalin): Once we have a unified ExtensionType, replace the |
| 681 // below member variables with a member of that type. | 687 // below member variables with a member of that type. |
| 682 bool is_theme; | 688 bool is_theme; |
| 683 bool is_app; | 689 bool is_app; |
| 684 bool converted_from_user_script; | 690 bool converted_from_user_script; |
| 685 GURL update_url; | 691 GURL update_url; |
| 686 }; | 692 }; |
| 687 | 693 |
| 688 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 694 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |