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

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.
joth 2012/07/31 17:34:27 2012
felipeg 2012/08/01 16:14:43 Done.
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
13 // that are required and not instantiate BaseSessionService or SessionBackend
14 // at all.
15
16 // static
17 const int SessionBackend::kFileReadBufferSize = 1024;
18
19 SessionBackend::SessionBackend(BaseSessionService::SessionType type,
20 const FilePath& path_to_dir)
21 : type_(type),
22 path_to_dir_(path_to_dir) {
23 }
24
25 void SessionBackend::Init() {
26 }
27
28 void SessionBackend::AppendCommands(std::vector<SessionCommand*>* commands,
29 bool reset_first) {
30 STLDeleteElements(commands);
31 delete commands;
32 }
33
34 void SessionBackend::ReadLastSessionCommands(
35 scoped_refptr<BaseSessionService::InternalGetCommandsRequest> request) {
36 if (request->canceled())
37 return;
38 Init();
39 ReadLastSessionCommandsImpl(&(request->commands));
40 request->ForwardResult(request->handle(), request);
41 }
42
43 bool SessionBackend::ReadLastSessionCommandsImpl(
44 std::vector<SessionCommand*>* commands) {
45 commands->clear();
46 return false;
47 }
48
49 void SessionBackend::DeleteLastSession() {
50 }
51
52 void SessionBackend::MoveCurrentSessionToLastSession() {
53 }
54
55 void SessionBackend::ReadCurrentSessionCommands(
56 scoped_refptr<BaseSessionService::InternalGetCommandsRequest> request) {
57 if (request->canceled())
58 return;
59 Init();
60 ReadCurrentSessionCommandsImpl(&(request->commands));
61 request->ForwardResult(request->handle(), request);
62 }
63
64 bool SessionBackend::ReadCurrentSessionCommandsImpl(
65 std::vector<SessionCommand*>* commands) {
66 commands->clear();
67 return false;
68 }
69
70 SessionBackend::~SessionBackend() {
71 }
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