Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: ios/chrome/browser/web/navigation_manager_util.h

Issue 2756483006: Adds NavigationManager util functions to ios/chrome/browser/web/ (Closed)
Patch Set: fixed unit tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+// all items are redirects.
+web::NavigationItem* GetLastNonRedirectedItem(
+ web::NavigationManager* nav_manager);
+
+#endif // IOS_CHROME_BROWSER_WEB_NAVIGATION_MANAGER_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698