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

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

Issue 10832080: Upstream session_backend_android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
Index: chrome/browser/sessions/session_backend_android.cc
diff --git a/chrome/browser/sessions/session_backend_android.cc b/chrome/browser/sessions/session_backend_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6c04a0e383a6ed0acc9fa45027927c29028add3a
--- /dev/null
+++ b/chrome/browser/sessions/session_backend_android.cc
@@ -0,0 +1,68 @@
+// Copyright (c) 2011 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_backend.h"
+
+#include "base/stl_util.h"
+#include "net/base/file_stream.h"
+
+// TODO(joth): This is dirty hack to stop SessionBackend from touching the
+// filesystem on Android as tab and session persistence is handled Java side.
+// A better design would be to factor out just those bits of TabRestoreService
sky 2012/07/31 15:26:09 I don't like this hack either. Please refactor app
felipeg 2012/08/01 16:00:58 I was blindly upstreaming this code, and don't hav
+// that are required and not instantiate BaseSessionService or SessionBackend
+// at all.
+
+SessionBackend::SessionBackend(BaseSessionService::SessionType type,
+ const FilePath& path_to_dir)
+ : type_(type),
+ path_to_dir_(path_to_dir) {
+}
+
+void SessionBackend::Init() {
+}
+
+void SessionBackend::AppendCommands(std::vector<SessionCommand*>* commands,
+ bool reset_first) {
+ STLDeleteElements(commands);
+ delete commands;
+}
+
+void SessionBackend::ReadLastSessionCommands(
+ scoped_refptr<BaseSessionService::InternalGetCommandsRequest> request) {
+ if (request->canceled())
+ return;
+ Init();
+ ReadLastSessionCommandsImpl(&(request->commands));
+ request->ForwardResult(request->handle(), request);
+}
+
+bool SessionBackend::ReadLastSessionCommandsImpl(
+ std::vector<SessionCommand*>* commands) {
+ commands->clear();
+ return false;
+}
+
+void SessionBackend::DeleteLastSession() {
+}
+
+void SessionBackend::MoveCurrentSessionToLastSession() {
+}
+
+void SessionBackend::ReadCurrentSessionCommands(
+ scoped_refptr<BaseSessionService::InternalGetCommandsRequest> request) {
+ if (request->canceled())
+ return;
+ Init();
+ ReadCurrentSessionCommandsImpl(&(request->commands));
+ request->ForwardResult(request->handle(), request);
+}
+
+bool SessionBackend::ReadCurrentSessionCommandsImpl(
+ std::vector<SessionCommand*>* commands) {
+ commands->clear();
+ return false;
+}
+
+SessionBackend::~SessionBackend() {
+}
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore_android.cc » ('j') | chrome/browser/sessions/session_restore_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698