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

Side by Side 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, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2011 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.
4
5 #include "chrome/browser/sessions/session_backend.h"
6
7 #include "base/stl_util.h"
8 #include "net/base/file_stream.h"
9
10 // TODO(joth): This is dirty hack to stop SessionBackend from touching the
11 // filesystem on Android as tab and session persistence is handled Java side.
12 // 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
13 // that are required and not instantiate BaseSessionService or SessionBackend
14 // at all.
15
16 SessionBackend::SessionBackend(BaseSessionService::SessionType type,
17 const FilePath& path_to_dir)
18 : type_(type),
19 path_to_dir_(path_to_dir) {
20 }
21
22 void SessionBackend::Init() {
23 }
24
25 void SessionBackend::AppendCommands(std::vector<SessionCommand*>* commands,
26 bool reset_first) {
27 STLDeleteElements(commands);
28 delete commands;
29 }
30
31 void SessionBackend::ReadLastSessionCommands(
32 scoped_refptr<BaseSessionService::InternalGetCommandsRequest> request) {
33 if (request->canceled())
34 return;
35 Init();
36 ReadLastSessionCommandsImpl(&(request->commands));
37 request->ForwardResult(request->handle(), request);
38 }
39
40 bool SessionBackend::ReadLastSessionCommandsImpl(
41 std::vector<SessionCommand*>* commands) {
42 commands->clear();
43 return false;
44 }
45
46 void SessionBackend::DeleteLastSession() {
47 }
48
49 void SessionBackend::MoveCurrentSessionToLastSession() {
50 }
51
52 void SessionBackend::ReadCurrentSessionCommands(
53 scoped_refptr<BaseSessionService::InternalGetCommandsRequest> request) {
54 if (request->canceled())
55 return;
56 Init();
57 ReadCurrentSessionCommandsImpl(&(request->commands));
58 request->ForwardResult(request->handle(), request);
59 }
60
61 bool SessionBackend::ReadCurrentSessionCommandsImpl(
62 std::vector<SessionCommand*>* commands) {
63 commands->clear();
64 return false;
65 }
66
67 SessionBackend::~SessionBackend() {
68 }
OLDNEW
« 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