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

Side by Side Diff: components/sessions/content/content_serialized_navigation_driver.h

Issue 2759333002: Move chrome-specific SerializedNavigation code to chrome/. (Closed)
Patch Set: Rebase, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ 5 #ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_
6 #define COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ 6 #define COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_
7 7
8 #include "components/sessions/core/serialized_navigation_driver.h"
9
10 #include <map> 8 #include <map>
11 #include <memory> 9 #include <memory>
12 #include <string> 10 #include <string>
13 11
14 #include "base/macros.h" 12 #include "base/macros.h"
15 #include "components/sessions/content/extended_info_handler.h" 13 #include "components/sessions/content/extended_info_handler.h"
14 #include "components/sessions/core/serialized_navigation_driver.h"
16 #include "components/sessions/core/sessions_export.h" 15 #include "components/sessions/core/sessions_export.h"
17 16
18 namespace base { 17 namespace base {
19 template <typename T> struct DefaultSingletonTraits; 18 template <typename T> struct DefaultSingletonTraits;
20 } 19 }
21 20
22 namespace sessions { 21 namespace sessions {
23 22
24 // Provides an implementation of SerializedNavigationDriver that is backed by 23 // Provides an implementation of SerializedNavigationDriver that is backed by
25 // content classes. 24 // content classes.
(...skipping 25 matching lines...) Expand all
51 void RegisterExtendedInfoHandler( 50 void RegisterExtendedInfoHandler(
52 const std::string& key, 51 const std::string& key,
53 std::unique_ptr<ExtendedInfoHandler> handler); 52 std::unique_ptr<ExtendedInfoHandler> handler);
54 53
55 using ExtendedInfoHandlerMap = 54 using ExtendedInfoHandlerMap =
56 std::map<std::string, std::unique_ptr<ExtendedInfoHandler>>; 55 std::map<std::string, std::unique_ptr<ExtendedInfoHandler>>;
57 56
58 // Returns all the registered handlers to deal with the extended info. 57 // Returns all the registered handlers to deal with the extended info.
59 const ExtendedInfoHandlerMap& GetAllExtendedInfoHandlers() const; 58 const ExtendedInfoHandlerMap& GetAllExtendedInfoHandlers() const;
60 59
60 void set_callback(const SanitizeCallback& callback) { callback_ = callback; }
61
61 private: 62 private:
62 friend struct base::DefaultSingletonTraits<ContentSerializedNavigationDriver>; 63 friend struct base::DefaultSingletonTraits<ContentSerializedNavigationDriver>;
63 friend class ContentSerializedNavigationBuilderTest; 64 friend class ContentSerializedNavigationBuilderTest;
64 65
65 ContentSerializedNavigationDriver(); 66 ContentSerializedNavigationDriver();
66 67
67 ExtendedInfoHandlerMap extended_info_handler_map_; 68 ExtendedInfoHandlerMap extended_info_handler_map_;
69 SanitizeCallback callback_;
68 70
69 DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationDriver); 71 DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationDriver);
70 }; 72 };
71 73
72 } // namespace sessions 74 } // namespace sessions
73 75
74 #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ 76 #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698