hunspell: Cleanup to fix the header include guards under google/ directory.
[chromium-blink-merge.git] / ios / web / history_state_util.h
blob7914c6d0d617969bde0102f193cff30b3c94d831
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
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_HISTORY_STATE_UTIL_H_
6 #define IOS_WEB_HISTORY_STATE_UTIL_H_
8 #include <string>
10 class GURL;
12 namespace web {
13 namespace history_state_util {
15 // Checks if toUrl is a valid argument to history.pushState() or
16 // history.replaceState() given the current URL.
17 bool IsHistoryStateChangeValid(const GURL& currentUrl,
18 const GURL& toUrl);
20 // Generates the appropriate full URL for a history.pushState() or
21 // history.replaceState() transition from currentURL to destination, resolved
22 // against baseURL. |destination| may be a relative URL. Will return an invalid
23 // URL if the resolved destination, or the transition, is not valid.
24 GURL GetHistoryStateChangeUrl(const GURL& currentUrl,
25 const GURL& baseUrl,
26 const std::string& destination);
28 } // namespace history_state_util
29 } // namespace web
31 #endif // IOS_WEB_HISTORY_STATE_UTIL_H_