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

Unified Diff: ios/chrome/browser/ui/tab_switcher/session_changes.mm

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/session_changes.h ('k') | ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698