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

Unified Diff: content/public/common/page_state_ios.cc

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to the top of page_state.h Created 7 years, 7 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: content/public/common/page_state_ios.cc
diff --git a/content/public/common/page_state_ios.cc b/content/public/common/page_state_ios.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c52eced401b067d16a3e03d15b3c2a57e7d0ee89
--- /dev/null
+++ b/content/public/common/page_state_ios.cc
@@ -0,0 +1,70 @@
+// Copyright (c) 2013 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.
+
+#include "content/public/common/page_state.h"
+
+#include "base/files/file_path.h"
+#include "base/logging.h"
+
+namespace content {
+
+// static
+PageState PageState::CreateFromEncodedData(const std::string& data) {
+ return PageState(data);
+}
+
+// static
+PageState PageState::CreateFromURL(const GURL& url) {
+ NOTIMPLEMENTED();
+ return PageState();
+}
+
+// static
+PageState PageState::CreateForTesting(
+ const GURL& url,
+ bool body_contains_password_data,
+ const char* optional_body_data,
+ const base::FilePath* optional_body_file_path) {
+ NOTIMPLEMENTED();
+ return PageState();
+}
+
+PageState::PageState() {
+}
+
+bool PageState::IsValid() const {
+ return !data_.empty();
+}
+
+bool PageState::Equals(const PageState& other) const {
+ return data_ == other.data_;
+}
+
+const std::string& PageState::ToEncodedData() const {
+ return data_;
+}
+
+std::vector<base::FilePath> PageState::GetReferencedFiles() const {
+ NOTIMPLEMENTED();
+ return std::vector<base::FilePath>();
+}
+
+PageState PageState::RemovePasswordData() const {
+ NOTIMPLEMENTED();
+ return *this;
+}
+
+PageState PageState::RemoveScrollOffset() const {
+ NOTIMPLEMENTED();
+ return *this;
+}
+
+PageState::PageState(const std::string& data)
+ : data_(data) {
+ // TODO(darin): Enable this DCHECK once tests have been fixed up to not pass
+ // bogus encoded data to CreateFromEncodedData.
+ //DCHECK(IsValid());
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698