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

Side by Side Diff: chrome/common/content_settings_pattern_serializer.cc

Issue 2614033004: Convert SetContentSettingRules to use mojo, part 2/2. (Closed)
Patch Set: Convert SetContentSettingRules to use mojo, part 2/2. Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/common/content_settings_pattern_serializer.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/content_settings_pattern_serializer.h"
6
7 #include "chrome/common/render_messages.h"
8 #include "components/content_settings/core/common/content_settings_pattern.h"
9
10 // static
11 void ContentSettingsPatternSerializer::GetSize(
12 const ContentSettingsPattern& pattern, base::PickleSizer* s) {
13 IPC::GetParamSize(s, pattern.is_valid_);
14 IPC::GetParamSize(s, pattern.parts_);
15 }
16
17 // static
18 void ContentSettingsPatternSerializer::WriteToMessage(
19 const ContentSettingsPattern& pattern,
20 base::Pickle* m) {
21 IPC::WriteParam(m, pattern.is_valid_);
22 IPC::WriteParam(m, pattern.parts_);
23 }
24
25 // static
26 bool ContentSettingsPatternSerializer::ReadFromMessage(
27 const base::Pickle* m,
28 base::PickleIterator* iter,
29 ContentSettingsPattern* pattern) {
30 DCHECK(pattern);
31 return IPC::ReadParam(m, iter, &pattern->is_valid_) &&
32 IPC::ReadParam(m, iter, &pattern->parts_);
33 }
OLDNEW
« no previous file with comments | « chrome/common/content_settings_pattern_serializer.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698