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

Side by Side Diff: components/sessions/core/session_service_commands.h

Issue 2600583002: Remove ScopedVector from components/sessions. (Closed)
Patch Set: include Created 3 years, 11 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_CORE_SESSION_SERVICE_COMMANDS_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_
6 #define COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ 6 #define COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 std::unique_ptr<SessionCommand>* command); 89 std::unique_ptr<SessionCommand>* command);
90 90
91 // Returns true if provided |command| either closes a window or a tab. 91 // Returns true if provided |command| either closes a window or a tab.
92 SESSIONS_EXPORT bool IsClosingCommand(SessionCommand* command); 92 SESSIONS_EXPORT bool IsClosingCommand(SessionCommand* command);
93 93
94 // Converts a list of commands into SessionWindows. On return any valid 94 // Converts a list of commands into SessionWindows. On return any valid
95 // windows are added to |valid_windows|. |active_window_id| will be set with the 95 // windows are added to |valid_windows|. |active_window_id| will be set with the
96 // id of the last active window, but it's only valid when this id corresponds 96 // id of the last active window, but it's only valid when this id corresponds
97 // to the id of one of the windows in |valid_windows|. 97 // to the id of one of the windows in |valid_windows|.
98 SESSIONS_EXPORT void RestoreSessionFromCommands( 98 SESSIONS_EXPORT void RestoreSessionFromCommands(
99 const ScopedVector<SessionCommand>& commands, 99 const std::vector<std::unique_ptr<SessionCommand>>& commands,
100 std::vector<std::unique_ptr<SessionWindow>>* valid_windows, 100 std::vector<std::unique_ptr<SessionWindow>>* valid_windows,
101 SessionID::id_type* active_window_id); 101 SessionID::id_type* active_window_id);
102 102
103 } // namespace sessions 103 } // namespace sessions
104 104
105 #endif // COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ 105 #endif // COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_
OLDNEW
« no previous file with comments | « components/sessions/core/session_backend_unittest.cc ('k') | components/sessions/core/session_service_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698