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

Unified Diff: chrome/browser/sessions/chrome_serialized_navigation_driver.h

Issue 2759333002: Move chrome-specific SerializedNavigation code to chrome/. (Closed)
Patch Set: Fix Android 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: chrome/browser/sessions/chrome_serialized_navigation_driver.h
diff --git a/chrome/browser/sessions/chrome_serialized_navigation_driver.h b/chrome/browser/sessions/chrome_serialized_navigation_driver.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6d2df5558d2cbe511c3dac1e06d98fedcaa2d84
--- /dev/null
+++ b/chrome/browser/sessions/chrome_serialized_navigation_driver.h
@@ -0,0 +1,40 @@
+// 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 CHROME_BROWSER_SESSIONS_CHROME_SERIALIZED_NAVIGATION_DRIVER_H_
+#define CHROME_BROWSER_SESSIONS_CHROME_SERIALIZED_NAVIGATION_DRIVER_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "components/sessions/content/content_serialized_navigation_driver.h"
+
+namespace base {
+template <typename T>
+struct DefaultSingletonTraits;
+}
+
+// Provides an implementation of ContentSerializedNavigationDriver that knows
+// about chrome/ specifics.
+class ChromeSerializedNavigationDriver
+ : public sessions::ContentSerializedNavigationDriver {
+ public:
+ ~ChromeSerializedNavigationDriver() override;
+
+ // Returns the singleton ChromeSerializedNavigationDriver. Almost all
+ // callers should use SerializedNavigationDriver::Get() instead.
+ static ChromeSerializedNavigationDriver* GetInstance();
+
+ // sessions::ContentSerializedNavigationDriver implementation.
+ void Sanitize(sessions::SerializedNavigationEntry* navigation) const override;
+
+ private:
+ friend struct base::DefaultSingletonTraits<ChromeSerializedNavigationDriver>;
+
+ ChromeSerializedNavigationDriver();
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeSerializedNavigationDriver);
+};
+
+#endif // CHROME_BROWSER_SESSIONS_CHROME_SERIALIZED_NAVIGATION_DRIVER_H_
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/sessions/chrome_serialized_navigation_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698