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

Unified Diff: components/sessions/content/content_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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/sessions/content/content_serialized_navigation_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/content/content_serialized_navigation_driver.h
diff --git a/components/sessions/content/content_serialized_navigation_driver.h b/components/sessions/content/content_serialized_navigation_driver.h
index 768300dd1c8385a8b52d56c1ab00c32eb2b2f94f..ec732a707661378a6e30f9ce3bff6bcbbe964fa4 100644
--- a/components/sessions/content/content_serialized_navigation_driver.h
+++ b/components/sessions/content/content_serialized_navigation_driver.h
@@ -5,14 +5,13 @@
#ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_
#define COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_
-#include "components/sessions/core/serialized_navigation_driver.h"
-
#include <map>
#include <memory>
#include <string>
#include "base/macros.h"
#include "components/sessions/content/extended_info_handler.h"
+#include "components/sessions/core/serialized_navigation_driver.h"
#include "components/sessions/core/sessions_export.h"
namespace base {
@@ -32,6 +31,9 @@ class SESSIONS_EXPORT ContentSerializedNavigationDriver
// callers should use SerializedNavigationDriver::Get() instead.
static ContentSerializedNavigationDriver* GetInstance();
+ // Allows an embedder to override the instance returned by GetInstance().
+ static void SetInstance(ContentSerializedNavigationDriver* instance);
+
// SerializedNavigationDriver implementation.
int GetDefaultReferrerPolicy() const override;
bool MapReferrerPolicyToOldValues(int referrer_policy,
@@ -58,12 +60,13 @@ class SESSIONS_EXPORT ContentSerializedNavigationDriver
// Returns all the registered handlers to deal with the extended info.
const ExtendedInfoHandlerMap& GetAllExtendedInfoHandlers() const;
+ protected:
+ ContentSerializedNavigationDriver();
+
private:
friend struct base::DefaultSingletonTraits<ContentSerializedNavigationDriver>;
friend class ContentSerializedNavigationBuilderTest;
- ContentSerializedNavigationDriver();
-
ExtendedInfoHandlerMap extended_info_handler_map_;
DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationDriver);
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/sessions/content/content_serialized_navigation_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698