Chromium Code Reviews| 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; | |
|
Charlie Reis
2015/08/03 20:41:38
Unfortunate, but it'll be short lived.
Avi (use Gerrit)
2015/08/03 20:51:53
Acknowledged.
| |
| 43 | 44 |
| 44 std::vector<base::FilePath> GetReferencedFiles() const; | 45 std::vector<base::FilePath> GetReferencedFiles() const; |
| 45 PageState RemovePasswordData() const; | 46 PageState RemovePasswordData() const; |
| 46 PageState RemoveScrollOffset() const; | 47 PageState RemoveScrollOffset() const; |
| 47 PageState RemoveReferrer() const; | 48 PageState RemoveReferrer() const; |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 PageState(const std::string& data); | 51 PageState(const std::string& data); |
| 51 | 52 |
| 52 std::string data_; | 53 std::string data_; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 // Support DCHECK_EQ(a, b), etc. | 56 // Support DCHECK_EQ(a, b), etc. |
| 56 inline bool operator==(const PageState& a, const PageState& b) { | 57 inline bool operator==(const PageState& a, const PageState& b) { |
| 57 return a.Equals(b); | 58 return a.Equals(b); |
| 58 } | 59 } |
| 59 inline bool operator!=(const PageState& a, const PageState& b) { | 60 inline bool operator!=(const PageState& a, const PageState& b) { |
| 60 return !(a == b); | 61 return !(a == b); |
| 61 } | 62 } |
| 62 | 63 |
| 63 } // namespace content | 64 } // namespace content |
| 64 | 65 |
| 65 #endif // CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ | 66 #endif // CONTENT_PUBLIC_COMMON_PAGE_STATE_H_ |
| OLD | NEW |