Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" | 8 #include "components/sessions/core/serialized_navigation_driver.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 std::unique_ptr<ExtendedInfoHandler> handler); | 53 std::unique_ptr<ExtendedInfoHandler> handler); |
| 54 | 54 |
| 55 using ExtendedInfoHandlerMap = | 55 using ExtendedInfoHandlerMap = |
| 56 std::map<std::string, std::unique_ptr<ExtendedInfoHandler>>; | 56 std::map<std::string, std::unique_ptr<ExtendedInfoHandler>>; |
| 57 | 57 |
| 58 // Returns all the registered handlers to deal with the extended info. | 58 // Returns all the registered handlers to deal with the extended info. |
| 59 const ExtendedInfoHandlerMap& GetAllExtendedInfoHandlers() const; | 59 const ExtendedInfoHandlerMap& GetAllExtendedInfoHandlers() const; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 ContentSerializedNavigationDriver(); | 62 ContentSerializedNavigationDriver(); |
| 63 friend struct base::DefaultSingletonTraits<ContentSerializedNavigationDriver>; | 63 friend struct base::DefaultSingletonTraits<ContentSerializedNavigationDriver>; |
|
sky
2016/10/07 15:35:25
Move all the friends before the constructor, newli
jianli
2016/10/12 21:38:00
Done.
| |
| 64 friend class ContentSerializedNavigationBuilderTest; | |
| 65 | |
| 66 // Removes all the registered extended info handlers. For testing only. | |
| 67 void RemoveAllExtendedInfoHandlersForTesting(); | |
|
sky
2016/10/07 15:35:25
Can the test do extended_info_handler_map_.clear()
jianli
2016/10/12 21:38:00
Done.
| |
| 64 | 68 |
| 65 ExtendedInfoHandlerMap extended_info_handler_map_; | 69 ExtendedInfoHandlerMap extended_info_handler_map_; |
| 66 | 70 |
| 67 DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationDriver); | 71 DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationDriver); |
| 68 }; | 72 }; |
| 69 | 73 |
| 70 } // namespace sessions | 74 } // namespace sessions |
| 71 | 75 |
| 72 #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ | 76 #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ |
| OLD | NEW |