OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/web/navigation/crw_session_entry.h" | 5 #import "ios/web/navigation/crw_session_entry.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // TODO(ios): Shall we overwrite EqualTo:? | 43 // TODO(ios): Shall we overwrite EqualTo:? |
44 | 44 |
45 - (instancetype)copyWithZone:(NSZone*)zone { | 45 - (instancetype)copyWithZone:(NSZone*)zone { |
46 CRWSessionEntry* copy = [[[self class] alloc] init]; | 46 CRWSessionEntry* copy = [[[self class] alloc] init]; |
47 copy->_navigationItem.reset( | 47 copy->_navigationItem.reset( |
48 new web::NavigationItemImpl(*_navigationItem.get())); | 48 new web::NavigationItemImpl(*_navigationItem.get())); |
49 return copy; | 49 return copy; |
50 } | 50 } |
51 | 51 |
52 - (NSString*)description { | 52 - (NSString*)description { |
53 return [NSString | 53 return _navigationItem->GetDescription(); |
54 stringWithFormat: | |
55 @"url:%@ originalurl:%@ title:%@ transition:%d displayState:%@ " | |
56 @"desktopUA:%d", | |
57 base::SysUTF8ToNSString(_navigationItem->GetURL().spec()), | |
58 base::SysUTF8ToNSString( | |
59 _navigationItem->GetOriginalRequestURL().spec()), | |
60 base::SysUTF16ToNSString(_navigationItem->GetTitle()), | |
61 _navigationItem->GetTransitionType(), | |
62 _navigationItem->GetPageDisplayState().GetDescription(), | |
63 _navigationItem->IsOverridingUserAgent()]; | |
64 } | 54 } |
65 | 55 |
66 - (web::NavigationItem*)navigationItem { | 56 - (web::NavigationItem*)navigationItem { |
67 return _navigationItem.get(); | 57 return _navigationItem.get(); |
68 } | 58 } |
69 | 59 |
70 - (web::NavigationItemImpl*)navigationItemImpl { | 60 - (web::NavigationItemImpl*)navigationItemImpl { |
71 return _navigationItem.get(); | 61 return _navigationItem.get(); |
72 } | 62 } |
73 | 63 |
74 @end | 64 @end |
OLD | NEW |