| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import "ios/chrome/browser/ui/bookmarks/bookmark_position_cache.h" | 5 #import "ios/chrome/browser/ui/bookmarks/bookmark_position_cache.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/objc_property_releaser.h" | 10 #include "base/mac/objc_release_properties.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 // The current version of the cached position. This number should be incremented | 13 // The current version of the cached position. This number should be incremented |
| 14 // each time the NSCoding implementation changes. | 14 // each time the NSCoding implementation changes. |
| 15 const int kVersion = 2; | 15 const int kVersion = 2; |
| 16 | 16 |
| 17 // The value 3 was used for items corresponding to managed bookmarks and | 17 // The value 3 was used for items corresponding to managed bookmarks and |
| 18 // was removed during the transition from UIWebView to WKWebView. | 18 // was removed during the transition from UIWebView to WKWebView. |
| 19 const int kMenuItemManaged = 3; | 19 const int kMenuItemManaged = 3; |
| 20 | 20 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 - (void)encodeWithCoder:(NSCoder*)coder { | 134 - (void)encodeWithCoder:(NSCoder*)coder { |
| 135 [coder encodeInt:kVersion forKey:kVersionKey]; | 135 [coder encodeInt:kVersion forKey:kVersionKey]; |
| 136 [coder encodeInt:static_cast<int>(self.type) forKey:kTypeKey]; | 136 [coder encodeInt:static_cast<int>(self.type) forKey:kTypeKey]; |
| 137 [coder encodeFloat:self.position forKey:kPositionKey]; | 137 [coder encodeFloat:self.position forKey:kPositionKey]; |
| 138 [coder encodeInt64:self.folderId forKey:kFolderKey]; | 138 [coder encodeInt64:self.folderId forKey:kFolderKey]; |
| 139 } | 139 } |
| 140 | 140 |
| 141 @end | 141 @end |
| OLD | NEW |