| Index: ios/chrome/browser/ui/tab_switcher/session_changes.mm
|
| diff --git a/ios/chrome/browser/ui/tab_switcher/session_changes.mm b/ios/chrome/browser/ui/tab_switcher/session_changes.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3e06b5245695d93056f71f1bd56783b9cc1f2149
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/tab_switcher/session_changes.mm
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#import "ios/chrome/browser/ui/tab_switcher/session_changes.h"
|
| +
|
| +#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.h"
|
| +
|
| +namespace ios_internal {
|
| +
|
| +SessionChanges::SessionChanges(
|
| + std::vector<size_t> const& tabHashesInInitialState,
|
| + std::vector<size_t> const& tabHashesInFinalState) {
|
| + ios_internal::MinimalReplacementOperations(tabHashesInInitialState,
|
| + tabHashesInFinalState, &updates_,
|
| + &deletions_, &insertions_);
|
| +}
|
| +
|
| +SessionChanges::~SessionChanges() {}
|
| +
|
| +std::vector<size_t> const& SessionChanges::deletions() const {
|
| + return deletions_;
|
| +}
|
| +std::vector<size_t> const& SessionChanges::insertions() const {
|
| + return insertions_;
|
| +}
|
| +std::vector<size_t> const& SessionChanges::updates() const {
|
| + return updates_;
|
| +}
|
| +
|
| +bool SessionChanges::hasChanges() const {
|
| + return updates_.size() || deletions_.size() || insertions_.size();
|
| +}
|
| +
|
| +} // namespace ios_internal
|
|
|