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

Unified Diff: components/sync_driver/glue/synced_session.h

Issue 1443453002: [Sync] Move sessions files from sync_driver to sync_sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ui/gfx deps. Created 5 years, 1 month 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 | « components/sync_driver/DEPS ('k') | components/sync_driver/glue/synced_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/glue/synced_session.h
diff --git a/components/sync_driver/glue/synced_session.h b/components/sync_driver/glue/synced_session.h
deleted file mode 100644
index 31407ed5f3336d7c00e52f252d1a0bbc1d68c045..0000000000000000000000000000000000000000
--- a/components/sync_driver/glue/synced_session.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2012 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 COMPONENTS_SYNC_DRIVER_GLUE_SYNCED_SESSION_H_
-#define COMPONENTS_SYNC_DRIVER_GLUE_SYNCED_SESSION_H_
-
-#include <map>
-#include <string>
-
-#include "base/time/time.h"
-#include "components/sessions/core/session_id.h"
-#include "components/sessions/core/session_types.h"
-#include "sync/protocol/session_specifics.pb.h"
-
-namespace sessions {
-struct SessionWindow;
-}
-
-namespace sync_driver {
-
-// Defines a synced session for use by session sync. A synced session is a
-// list of windows along with a unique session identifer (tag) and meta-data
-// about the device being synced.
-struct SyncedSession {
- typedef std::map<SessionID::id_type, sessions::SessionWindow*>
- SyncedWindowMap;
-
- // The type of device.
- // Please keep in sync with ForeignSessionHelper.java
- enum DeviceType {
- TYPE_UNSET = 0,
- TYPE_WIN = 1,
- TYPE_MACOSX = 2,
- TYPE_LINUX = 3,
- TYPE_CHROMEOS = 4,
- TYPE_OTHER = 5,
- TYPE_PHONE = 6,
- TYPE_TABLET = 7
- };
-
- SyncedSession();
- ~SyncedSession();
-
- // Unique tag for each session.
- std::string session_tag;
- // User-visible name
- std::string session_name;
-
- // Type of device this session is from.
- DeviceType device_type;
-
- // Last time this session was modified remotely.
- base::Time modified_time;
-
- // Map of windows that make up this session. Windowws are owned by the session
- // itself and free'd on destruction.
- SyncedWindowMap windows;
-
- // Converts the DeviceType enum value to a string. This is used
- // in the NTP handler for foreign sessions for matching session
- // types to an icon style.
- std::string DeviceTypeAsString() const {
- switch (device_type) {
- case SyncedSession::TYPE_WIN:
- return "win";
- case SyncedSession::TYPE_MACOSX:
- return "macosx";
- case SyncedSession::TYPE_LINUX:
- return "linux";
- case SyncedSession::TYPE_CHROMEOS:
- return "chromeos";
- case SyncedSession::TYPE_OTHER:
- return "other";
- case SyncedSession::TYPE_PHONE:
- return "phone";
- case SyncedSession::TYPE_TABLET:
- return "tablet";
- default:
- return std::string();
- }
- }
-
- // Convert this object to its protocol buffer equivalent. Shallow conversion,
- // does not create SessionTab protobufs.
- sync_pb::SessionHeader ToSessionHeader() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SyncedSession);
-};
-
-} // namespace sync_driver
-
-#endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNCED_SESSION_H_
« no previous file with comments | « components/sync_driver/DEPS ('k') | components/sync_driver/glue/synced_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698