| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/common/shell_extensions_client.h" | 5 #include "extensions/shell/common/shell_extensions_client.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "extensions/common/api/generated_schemas.h" | 9 #include "extensions/common/api/generated_schemas.h" |
| 10 #include "extensions/common/common_manifest_handlers.h" | 10 #include "extensions/common/common_manifest_handlers.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 // TODO(jamescook): Refactor ChromePermissionsMessageProvider so we can share | 37 // TODO(jamescook): Refactor ChromePermissionsMessageProvider so we can share |
| 38 // code. For now, this implementation does nothing. | 38 // code. For now, this implementation does nothing. |
| 39 class ShellPermissionMessageProvider : public PermissionMessageProvider { | 39 class ShellPermissionMessageProvider : public PermissionMessageProvider { |
| 40 public: | 40 public: |
| 41 ShellPermissionMessageProvider() {} | 41 ShellPermissionMessageProvider() {} |
| 42 ~ShellPermissionMessageProvider() override {} | 42 ~ShellPermissionMessageProvider() override {} |
| 43 | 43 |
| 44 // PermissionMessageProvider implementation. | 44 // PermissionMessageProvider implementation. |
| 45 PermissionMessages GetPermissionMessages( | 45 PermissionMessageStrings GetPermissionMessageStrings( |
| 46 const PermissionSet* permissions, | 46 const PermissionSet* permissions, |
| 47 Manifest::Type extension_type) const override { | 47 Manifest::Type extension_type) const override { |
| 48 return PermissionMessages(); | 48 return PermissionMessageStrings(); |
| 49 } |
| 50 |
| 51 PermissionMessageIDs GetLegacyPermissionMessageIDs( |
| 52 const PermissionSet* permissions, |
| 53 Manifest::Type extension_type) const override { |
| 54 return PermissionMessageIDs(); |
| 49 } | 55 } |
| 50 | 56 |
| 51 CoalescedPermissionMessages GetCoalescedPermissionMessages( | 57 CoalescedPermissionMessages GetCoalescedPermissionMessages( |
| 52 const PermissionIDSet& permissions) const override { | 58 const PermissionIDSet& permissions) const override { |
| 53 return CoalescedPermissionMessages(); | 59 return CoalescedPermissionMessages(); |
| 54 } | 60 } |
| 55 | 61 |
| 56 std::vector<base::string16> GetWarningMessages( | 62 std::vector<base::string16> GetLegacyWarningMessages( |
| 57 const PermissionSet* permissions, | 63 const PermissionSet* permissions, |
| 58 Manifest::Type extension_type) const override { | 64 Manifest::Type extension_type) const override { |
| 59 return std::vector<base::string16>(); | 65 return std::vector<base::string16>(); |
| 60 } | 66 } |
| 61 | 67 |
| 62 std::vector<base::string16> GetWarningMessagesDetails( | 68 std::vector<base::string16> GetLegacyWarningMessagesDetails( |
| 63 const PermissionSet* permissions, | 69 const PermissionSet* permissions, |
| 64 Manifest::Type extension_type) const override { | 70 Manifest::Type extension_type) const override { |
| 65 return std::vector<base::string16>(); | 71 return std::vector<base::string16>(); |
| 66 } | 72 } |
| 67 | 73 |
| 68 bool IsPrivilegeIncrease(const PermissionSet* old_permissions, | 74 bool IsPrivilegeIncrease(const PermissionSet* old_permissions, |
| 69 const PermissionSet* new_permissions, | 75 const PermissionSet* new_permissions, |
| 70 Manifest::Type extension_type) const override { | 76 Manifest::Type extension_type) const override { |
| 71 // Ensure we implement this before shipping. | 77 // Ensure we implement this before shipping. |
| 72 CHECK(false); | 78 CHECK(false); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 return extension_urls::kChromeWebstoreUpdateURL; | 233 return extension_urls::kChromeWebstoreUpdateURL; |
| 228 } | 234 } |
| 229 | 235 |
| 230 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { | 236 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { |
| 231 // TODO(rockot): Maybe we want to do something else here. For now we accept | 237 // TODO(rockot): Maybe we want to do something else here. For now we accept |
| 232 // any URL as a blacklist URL because we don't really care. | 238 // any URL as a blacklist URL because we don't really care. |
| 233 return true; | 239 return true; |
| 234 } | 240 } |
| 235 | 241 |
| 236 } // namespace extensions | 242 } // namespace extensions |
| OLD | NEW |