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

Unified Diff: chrome/common/content_settings_pattern_serializer.cc

Issue 440423003: Clean content_settings_pattern_parser.* from unnecessary dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm content_settings_initializer Created 6 years, 3 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 | « chrome/common/content_settings_pattern_serializer.h ('k') | chrome/common/render_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/content_settings_pattern_serializer.cc
diff --git a/chrome/common/content_settings_pattern_serializer.cc b/chrome/common/content_settings_pattern_serializer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7bf2c2f37770a9c0ed5aeb2a4413ba0862b4fd39
--- /dev/null
+++ b/chrome/common/content_settings_pattern_serializer.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/content_settings_pattern_serializer.h"
+
+#include "chrome/common/content_settings_pattern.h"
+#include "chrome/common/render_messages.h"
+
+// static
+void ContentSettingsPatternSerializer::WriteToMessage(
+ const ContentSettingsPattern& pattern,
+ IPC::Message* m) {
+ IPC::WriteParam(m, pattern.is_valid_);
+ IPC::WriteParam(m, pattern.parts_);
+}
+
+// static
+bool ContentSettingsPatternSerializer::ReadFromMessage(
+ const IPC::Message* m,
+ PickleIterator* iter,
+ ContentSettingsPattern* pattern) {
+ DCHECK(pattern);
+ return IPC::ReadParam(m, iter, &pattern->is_valid_) &&
+ IPC::ReadParam(m, iter, &pattern->parts_);
+}
« no previous file with comments | « chrome/common/content_settings_pattern_serializer.h ('k') | chrome/common/render_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698