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

Unified Diff: chrome/browser/sessions/session_service_utils.cc

Issue 672083002: Refactoring of SessionService to get componentized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More shuffling Created 6 years, 2 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
Index: chrome/browser/sessions/session_service_utils.cc
diff --git a/chrome/browser/sessions/session_service_utils.cc b/chrome/browser/sessions/session_service_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3a1c3a28e1010748af29467bbfaf8e4f36b99e46
--- /dev/null
+++ b/chrome/browser/sessions/session_service_utils.cc
@@ -0,0 +1,24 @@
+// Copyright 2014 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.
+
+#include "chrome/browser/sessions/session_service_utils.h"
+
+SessionWindow::WindowType WindowTypeForBrowserType(Browser::Type type) {
+ switch (type) {
+ case Browser::TYPE_POPUP:
+ return SessionWindow::TYPE_POPUP;
+ case Browser::TYPE_TABBED:
+ return SessionWindow::TYPE_TABBED;
+ }
+ NOTREACHED();
+}
+
+Browser::Type BrowserTypeForWindowType(SessionWindow::WindowType type) {
+ switch (type) {
+ case SessionWindow::TYPE_POPUP:
+ return Browser::TYPE_POPUP;
+ case SessionWindow::TYPE_TABBED:
+ return Browser::TYPE_TABBED;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698