OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ios/chrome/browser/ui/tab_switcher/tab_switcher_session_changes.h" | 5 #include "ios/chrome/browser/ui/tab_switcher/tab_switcher_session_changes.h" |
6 | 6 |
7 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.h" | 7 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.h" |
8 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
9 TabSwitcherSessionChanges::TabSwitcherSessionChanges( | 13 TabSwitcherSessionChanges::TabSwitcherSessionChanges( |
10 std::vector<size_t> const& tabHashesInInitialState, | 14 std::vector<size_t> const& tabHashesInInitialState, |
11 std::vector<size_t> const& tabHashesInFinalState) { | 15 std::vector<size_t> const& tabHashesInFinalState) { |
12 TabSwitcherMinimalReplacementOperations(tabHashesInInitialState, | 16 TabSwitcherMinimalReplacementOperations(tabHashesInInitialState, |
13 tabHashesInFinalState, &updates_, | 17 tabHashesInFinalState, &updates_, |
14 &deletions_, &insertions_); | 18 &deletions_, &insertions_); |
15 } | 19 } |
16 | 20 |
17 TabSwitcherSessionChanges::~TabSwitcherSessionChanges() {} | 21 TabSwitcherSessionChanges::~TabSwitcherSessionChanges() {} |
18 | 22 |
19 bool TabSwitcherSessionChanges::HasChanges() const { | 23 bool TabSwitcherSessionChanges::HasChanges() const { |
20 return updates_.size() || deletions_.size() || insertions_.size(); | 24 return updates_.size() || deletions_.size() || insertions_.size(); |
21 } | 25 } |
OLD | NEW |