Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: extensions/common/extension_messages.cc

Issue 2697463002: Convert utility process extension Unpacker IPC to mojo (Closed)
Patch Set: Set the IPC enum traits limit to extensions::Manifest::NUM_LOCATIONS - 1. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/OWNERS ('k') | extensions/common/extension_unpacker.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_messages.cc
diff --git a/extensions/common/extension_messages.cc b/extensions/common/extension_messages.cc
index 34b15ed89879781b77bbc59636d0d0a2420a2d89..8e56f09da3846e298b97dae446fae47936a1fb63 100644
--- a/extensions/common/extension_messages.cc
+++ b/extensions/common/extension_messages.cc
@@ -13,6 +13,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handler.h"
+#include "extensions/common/manifest_location_param_traits.h"
#include "extensions/common/permissions/permissions_data.h"
#include "extensions/common/permissions/permissions_info.h"
@@ -101,29 +102,6 @@ scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension(
namespace IPC {
-template <>
-struct ParamTraits<Manifest::Location> {
- typedef Manifest::Location param_type;
- static void Write(base::Pickle* m, const param_type& p) {
- int val = static_cast<int>(p);
- WriteParam(m, val);
- }
- static bool Read(const base::Pickle* m,
- base::PickleIterator* iter,
- param_type* p) {
- int val = 0;
- if (!ReadParam(m, iter, &val) ||
- val < Manifest::INVALID_LOCATION ||
- val >= Manifest::NUM_LOCATIONS)
- return false;
- *p = static_cast<param_type>(val);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- ParamTraits<int>::Log(static_cast<int>(p), l);
- }
-};
-
void ParamTraits<URLPattern>::GetSize(base::PickleSizer* s,
const param_type& p) {
GetParamSize(s, p.valid_schemes());
« no previous file with comments | « extensions/common/OWNERS ('k') | extensions/common/extension_unpacker.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698