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

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

Issue 2582203003: Convert SetContentSettingRules to use mojo, part 1/2. (Closed)
Patch Set: Convert SetContentSettingRules to use mojo, part 1/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/BUILD.gn ('k') | chrome/common/renderer_configuration.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_ 5 #ifndef CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_
6 #define CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_ 6 #define CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace base { 10 namespace base {
11 class Pickle; 11 class Pickle;
12 class PickleIterator; 12 class PickleIterator;
13 class PickleSizer; 13 class PickleSizer;
14 } 14 }
15 15
16 class ContentSettingsPattern; 16 class ContentSettingsPattern;
17 17
18 // TODO(nigeltao): delete this class, once content settings is Mojofied.
18 class ContentSettingsPatternSerializer { 19 class ContentSettingsPatternSerializer {
19 public: 20 public:
20 // Gets the serialized pattern's size. 21 // Gets the serialized pattern's size.
21 static void GetSize(const ContentSettingsPattern& pattern, 22 static void GetSize(const ContentSettingsPattern& pattern,
22 base::PickleSizer* s); 23 base::PickleSizer* s);
23 24
24 // Serializes the pattern to an IPC message. 25 // Serializes the pattern to an IPC message.
25 static void WriteToMessage(const ContentSettingsPattern& pattern, 26 static void WriteToMessage(const ContentSettingsPattern& pattern,
26 base::Pickle* m); 27 base::Pickle* m);
27 // Deserializes the pattern from the IPC message. 28 // Deserializes the pattern from the IPC message.
28 static bool ReadFromMessage(const base::Pickle* m, 29 static bool ReadFromMessage(const base::Pickle* m,
29 base::PickleIterator* iter, 30 base::PickleIterator* iter,
30 ContentSettingsPattern* pattern); 31 ContentSettingsPattern* pattern);
31 32
32 private: 33 private:
33 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingsPatternSerializer); 34 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingsPatternSerializer);
34 }; 35 };
35 36
36 #endif // CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_ 37 #endif // CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_
OLDNEW
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/renderer_configuration.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698