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 #include "components/sessions/core/session_service_commands.h" | 5 #include "components/sessions/core/session_service_commands.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 SessionID::id_type* active_window_id) { | 890 SessionID::id_type* active_window_id) { |
891 std::map<int, SessionTab*> tabs; | 891 std::map<int, SessionTab*> tabs; |
892 std::map<int, SessionWindow*> windows; | 892 std::map<int, SessionWindow*> windows; |
893 | 893 |
894 DVLOG(1) << "RestoreSessionFromCommands " << commands.size(); | 894 DVLOG(1) << "RestoreSessionFromCommands " << commands.size(); |
895 if (CreateTabsAndWindows(commands, &tabs, &windows, active_window_id)) { | 895 if (CreateTabsAndWindows(commands, &tabs, &windows, active_window_id)) { |
896 AddTabsToWindows(&tabs, &windows); | 896 AddTabsToWindows(&tabs, &windows); |
897 SortTabsBasedOnVisualOrderAndPrune(&windows, valid_windows); | 897 SortTabsBasedOnVisualOrderAndPrune(&windows, valid_windows); |
898 UpdateSelectedTabIndex(valid_windows); | 898 UpdateSelectedTabIndex(valid_windows); |
899 } | 899 } |
900 STLDeleteValues(&tabs); | 900 base::STLDeleteValues(&tabs); |
901 // Don't delete contents of windows, that is done by the caller as all | 901 // Don't delete contents of windows, that is done by the caller as all |
902 // valid windows are added to valid_windows. | 902 // valid windows are added to valid_windows. |
903 } | 903 } |
904 | 904 |
905 } // namespace sessions | 905 } // namespace sessions |
OLD | NEW |