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

Unified Diff: ipc/ipc_message_utils.h

Issue 2748133007: Remove ScopedVector from ipc/. (Closed)
Patch Set: 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 | « ipc/ipc_channel_reader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 40dd6706cb0ee93205a21f1b8c57a7b545935e3a..2d51c984aa0c0fdf005b355c989bfb6774b72bf0 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -21,7 +21,6 @@
#include "base/containers/stack_container.h"
#include "base/files/file.h"
#include "base/format_macros.h"
-#include "base/memory/scoped_vector.h"
#include "base/optional.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
@@ -856,39 +855,6 @@ struct ParamTraits<std::tuple<A, B, C, D, E>> {
}
};
-template<class P>
-struct ParamTraits<ScopedVector<P> > {
- typedef ScopedVector<P> param_type;
- static void Write(base::Pickle* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p.size()));
- for (size_t i = 0; i < p.size(); i++)
- WriteParam(m, *p[i]);
- }
- static bool Read(const base::Pickle* m,
- base::PickleIterator* iter,
- param_type* r) {
- int size = 0;
- if (!iter->ReadLength(&size))
- return false;
- if (INT_MAX/sizeof(P) <= static_cast<size_t>(size))
- return false;
- r->resize(size);
- for (int i = 0; i < size; i++) {
- (*r)[i] = new P();
- if (!ReadParam(m, iter, (*r)[i]))
- return false;
- }
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- for (size_t i = 0; i < p.size(); ++i) {
- if (i != 0)
- l->append(" ");
- LogParam(*p[i], l);
- }
- }
-};
-
template <class P, size_t stack_capacity>
struct ParamTraits<base::StackVector<P, stack_capacity> > {
typedef base::StackVector<P, stack_capacity> param_type;
« no previous file with comments | « ipc/ipc_channel_reader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698