Chromium Code Reviews| Index: ios/chrome/browser/web/navigation_manager_util.h |
| diff --git a/ios/chrome/browser/web/navigation_manager_util.h b/ios/chrome/browser/web/navigation_manager_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..24ec5b38c296fe3380892ad4dfbabae689f2d16e |
| --- /dev/null |
| +++ b/ios/chrome/browser/web/navigation_manager_util.h |
| @@ -0,0 +1,19 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ |
| +#define IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ |
| + |
| +#import "ios/web/public/navigation_item.h" |
| +#import "ios/web/public/navigation_manager.h" |
| + |
| +// Utility functions built on web::NavigationManager public API. |
| + |
| +// Returns the most recent navigation item that is not the result of an HTTP |
| +// Redirect. Returns nullptr if |nav_manager| is empty or the first item if |
|
Eugene But (OOO till 7-30)
2017/03/17 14:32:04
It's quite unexpected that GetLastNonRedirectedIte
kkhorimoto
2017/03/17 17:16:58
The only use case of |-lastUserItem| was for reloa
pkl (ping after 24h if needed)
2017/03/17 20:23:52
Acknowledged.
pkl (ping after 24h if needed)
2017/03/17 20:23:53
I'm inclined to preserve the existing behavior and
|
| +// all items are redirects. |
| +web::NavigationItem* GetLastNonRedirectedItem( |
| + web::NavigationManager* nav_manager); |
| + |
| +#endif // IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_ |