| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ | 5 #ifndef IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ |
| 6 #define IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ | 6 #define IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ |
| 7 | 7 |
| 8 #import "ios/web/public/navigation_item.h" | 8 #import "ios/web/public/navigation_item.h" |
| 9 #import "ios/web/public/navigation_manager.h" | 9 #import "ios/web/public/navigation_manager.h" |
| 10 | 10 |
| 11 // Utility functions built on web::NavigationManager public API. | 11 // Utility functions built on web::NavigationManager public API. |
| 12 | 12 |
| 13 // Returns the most recent navigation item that is not the result of an HTTP | 13 // Returns the most recent navigation item that is not the result of an HTTP |
| 14 // Redirect. Returns nullptr if |nav_manager| is empty or the first item if | 14 // Redirect. Returns nullptr if |nav_manager| is nullptr or is empty. |
| 15 // all items are redirects. | 15 // If all items are redirects, the first item is returned. |
| 16 web::NavigationItem* GetLastNonRedirectedItem( | 16 web::NavigationItem* GetLastNonRedirectedItem( |
| 17 web::NavigationManager* nav_manager); | 17 web::NavigationManager* nav_manager); |
| 18 | 18 |
| 19 #endif // IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ | 19 #endif // IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ |
| OLD | NEW |