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

Side by Side Diff: chrome/browser/sessions/base_session_service.h

Issue 11597010: Automate more Better Session Restore tests: Crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_
6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ 6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const base::Closure& task); 156 const base::Closure& task);
157 157
158 // Returns true if we appear to be running in production, false if we appear 158 // Returns true if we appear to be running in production, false if we appear
159 // to be running as part of a unit test or if the FILE thread has gone away. 159 // to be running as part of a unit test or if the FILE thread has gone away.
160 bool RunningInProduction() const; 160 bool RunningInProduction() const;
161 161
162 // Max number of navigation entries in each direction we'll persist. 162 // Max number of navigation entries in each direction we'll persist.
163 static const int max_persist_navigation_count; 163 static const int max_persist_navigation_count;
164 164
165 private: 165 private:
166 friend class BetterSessionRestoreCrashTest;
jochen (gone - plz use gerrit) 2012/12/17 16:21:20 empty line after this
marja 2012/12/17 16:45:58 Done.
166 // The profile. This may be null during testing. 167 // The profile. This may be null during testing.
167 Profile* profile_; 168 Profile* profile_;
168 169
169 // The backend. 170 // The backend.
170 scoped_refptr<SessionBackend> backend_; 171 scoped_refptr<SessionBackend> backend_;
171 172
172 // Used to invoke Save. 173 // Used to invoke Save.
173 base::WeakPtrFactory<BaseSessionService> weak_factory_; 174 base::WeakPtrFactory<BaseSessionService> weak_factory_;
174 175
175 // Commands we need to send over to the backend. 176 // Commands we need to send over to the backend.
176 std::vector<SessionCommand*> pending_commands_; 177 std::vector<SessionCommand*> pending_commands_;
177 178
178 // Whether the backend file should be recreated the next time we send 179 // Whether the backend file should be recreated the next time we send
179 // over the commands. 180 // over the commands.
180 bool pending_reset_; 181 bool pending_reset_;
181 182
182 // The number of commands sent to the backend before doing a reset. 183 // The number of commands sent to the backend before doing a reset.
183 int commands_since_reset_; 184 int commands_since_reset_;
184 185
185 DISALLOW_COPY_AND_ASSIGN(BaseSessionService); 186 DISALLOW_COPY_AND_ASSIGN(BaseSessionService);
186 }; 187 };
187 188
188 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ 189 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698