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

Unified Diff: sync/test/fake_server/sessions_hierarchy.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/test/fake_server/permanent_entity.cc ('k') | sync/test/fake_server/sessions_hierarchy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/sessions_hierarchy.h
diff --git a/sync/test/fake_server/sessions_hierarchy.h b/sync/test/fake_server/sessions_hierarchy.h
deleted file mode 100644
index eac1541b0f9ee9c348c7045ba22f89df43ed2b8b..0000000000000000000000000000000000000000
--- a/sync/test/fake_server/sessions_hierarchy.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2015 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.
-
-#ifndef SYNC_TEST_FAKE_SERVER_SESSIONS_HIERARCHY_H_
-#define SYNC_TEST_FAKE_SERVER_SESSIONS_HIERARCHY_H_
-
-#include <set>
-#include <string>
-
-#include "base/macros.h"
-
-namespace fake_server {
-
-class SessionsHierarchy;
-
-// A representation of the Sync Sessions hierarchy (windows and the URLs of
-// their tabs).
-class SessionsHierarchy {
- public:
- // Creates an empty (no windows) SessionsHierachy.
- SessionsHierarchy();
-
- ~SessionsHierarchy();
-
- // Add a window to the builder with one tab.
- void AddWindow(const std::string& tab);
-
- // Add a window to the builder with multiple tabs.
- void AddWindow(const std::multiset<std::string>& tabs);
-
- // Creates and returns a human-readable string version of this object's data.
- std::string ToString() const;
-
- // Returns true when this object and |other| have equivalent data.
- //
- // Two SessionHierarchy objects A and B have equivalent data iff:
- // 1) A and B contain the same number of Windows, and
- // 2) Each Window of A is equal (as a multiset) to exactly one Window of B
- // (and vice versa).
- //
- // Examples of equivalent hierarchies:
- // {} and {}, {{X}} and {{X}}, {{X,Y}} and {{Y,X}}, {{X},{Y}} and {{Y},{X}}
- // Examples of nonequivalent hierarchies:
- // {{X}} and {{Y}}, {{X}} and {{X,X}}, {{X}} and {{X},{X}}
- bool Equals(const SessionsHierarchy& other) const;
-
- private:
- // A collection of tab URLs.
- typedef std::multiset<std::string> Window;
-
- // A collection of Windows (an instance of this collection represents a
- // sessions hierarchy).
- typedef std::multiset<Window> WindowContainer;
-
- // The windows of the sessions hierarchy.
- WindowContainer windows_;
-};
-
-} // namespace fake_server
-
-#endif // SYNC_TEST_FAKE_SERVER_SESSIONS_HIERARCHY_H_
« no previous file with comments | « sync/test/fake_server/permanent_entity.cc ('k') | sync/test/fake_server/sessions_hierarchy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698