| OLD | NEW |
| (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 #ifndef CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_ | |
| 6 #define CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 | |
| 10 namespace base { | |
| 11 class Pickle; | |
| 12 class PickleIterator; | |
| 13 class PickleSizer; | |
| 14 } | |
| 15 | |
| 16 class ContentSettingsPattern; | |
| 17 | |
| 18 // TODO(nigeltao): delete this class, once content settings is Mojofied. | |
| 19 class ContentSettingsPatternSerializer { | |
| 20 public: | |
| 21 // Gets the serialized pattern's size. | |
| 22 static void GetSize(const ContentSettingsPattern& pattern, | |
| 23 base::PickleSizer* s); | |
| 24 | |
| 25 // Serializes the pattern to an IPC message. | |
| 26 static void WriteToMessage(const ContentSettingsPattern& pattern, | |
| 27 base::Pickle* m); | |
| 28 // Deserializes the pattern from the IPC message. | |
| 29 static bool ReadFromMessage(const base::Pickle* m, | |
| 30 base::PickleIterator* iter, | |
| 31 ContentSettingsPattern* pattern); | |
| 32 | |
| 33 private: | |
| 34 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingsPatternSerializer); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_COMMON_CONTENT_SETTINGS_PATTERN_SERIALIZER_H_ | |
| OLD | NEW |