| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ | 6 #define CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const GURL& url, | 33 const GURL& url, |
| 34 bool body_contains_password_data, | 34 bool body_contains_password_data, |
| 35 const char* optional_body_data, | 35 const char* optional_body_data, |
| 36 const base::FilePath* optional_body_file_path); | 36 const base::FilePath* optional_body_file_path); |
| 37 | 37 |
| 38 PageState(); | 38 PageState(); |
| 39 | 39 |
| 40 bool IsValid() const; | 40 bool IsValid() const; |
| 41 bool Equals(const PageState& page_state) const; | 41 bool Equals(const PageState& page_state) const; |
| 42 const std::string& ToEncodedData() const; | 42 const std::string& ToEncodedData() const; |
| 43 std::string GetTopLevelUrlStringTemporaryForBug369661() const; | |
| 44 | 43 |
| 45 std::vector<base::FilePath> GetReferencedFiles() const; | 44 std::vector<base::FilePath> GetReferencedFiles() const; |
| 46 PageState RemovePasswordData() const; | 45 PageState RemovePasswordData() const; |
| 47 PageState RemoveScrollOffset() const; | 46 PageState RemoveScrollOffset() const; |
| 48 PageState RemoveReferrer() const; | 47 PageState RemoveReferrer() const; |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 PageState(const std::string& data); | 50 PageState(const std::string& data); |
| 52 | 51 |
| 53 std::string data_; | 52 std::string data_; |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 // Support DCHECK_EQ(a, b), etc. | 55 // Support DCHECK_EQ(a, b), etc. |
| 57 inline bool operator==(const PageState& a, const PageState& b) { | 56 inline bool operator==(const PageState& a, const PageState& b) { |
| 58 return a.Equals(b); | 57 return a.Equals(b); |
| 59 } | 58 } |
| 60 inline bool operator!=(const PageState& a, const PageState& b) { | 59 inline bool operator!=(const PageState& a, const PageState& b) { |
| 61 return !(a == b); | 60 return !(a == b); |
| 62 } | 61 } |
| 63 | 62 |
| 64 } // namespace content | 63 } // namespace content |
| 65 | 64 |
| 66 #endif // CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ | 65 #endif // CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ |
| OLD | NEW |