OLD | NEW |
---|---|
(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 } | |
OLD | NEW |