Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / sync / glue / session_sync_test_helper.h
blob5d2fc7d0b8fc727170a597b6e9c9b7c3ebb62753
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_
8 #include <string>
9 #include <vector>
11 #include "components/sessions/session_id.h"
13 namespace sync_driver {
14 struct SyncedSession;
17 namespace sync_pb {
18 class SessionSpecifics;
21 namespace browser_sync {
23 class SessionSyncTestHelper {
24 public:
25 SessionSyncTestHelper() : max_tab_node_id_(0) {}
27 static void BuildSessionSpecifics(const std::string& tag,
28 sync_pb::SessionSpecifics* meta);
30 static void AddWindowSpecifics(int window_id,
31 const std::vector<int>& tab_list,
32 sync_pb::SessionSpecifics* meta);
34 static void VerifySyncedSession(
35 const std::string& tag,
36 const std::vector<std::vector<SessionID::id_type>>& windows,
37 const sync_driver::SyncedSession& session);
39 void BuildTabSpecifics(const std::string& tag,
40 int window_id,
41 int tab_id,
42 sync_pb::SessionSpecifics* tab_base);
44 sync_pb::SessionSpecifics BuildForeignSession(
45 const std::string& tag,
46 const std::vector<SessionID::id_type>& tab_list,
47 std::vector<sync_pb::SessionSpecifics>* tabs);
49 void Reset();
51 private:
52 int max_tab_node_id_;
53 DISALLOW_COPY_AND_ASSIGN(SessionSyncTestHelper);
56 } // namespace browser_sync
58 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_