| OLD | NEW |
| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // Returns true if the entry at specified |url| should be written to disk. | 156 // Returns true if the entry at specified |url| should be written to disk. |
| 157 bool ShouldTrackEntry(const GURL& url); | 157 bool ShouldTrackEntry(const GURL& url); |
| 158 | 158 |
| 159 // Invokes ReadLastSessionCommands with request on the backend thread. | 159 // Invokes ReadLastSessionCommands with request on the backend thread. |
| 160 // If testing, ReadLastSessionCommands is invoked directly. | 160 // If testing, ReadLastSessionCommands is invoked directly. |
| 161 Handle ScheduleGetLastSessionCommands( | 161 Handle ScheduleGetLastSessionCommands( |
| 162 InternalGetCommandsRequest* request, | 162 InternalGetCommandsRequest* request, |
| 163 CancelableRequestConsumerBase* consumer); | 163 CancelableRequestConsumerBase* consumer); |
| 164 | 164 |
| 165 // Returns true if we appear to be running in production, false if | |
| 166 // we appear to be running as part of a unit test or if the FILE | |
| 167 // thread has gone away. | |
| 168 bool RunningInProduction() const; | |
| 169 | |
| 170 // In production, this posts the task to the FILE thread. For | 165 // In production, this posts the task to the FILE thread. For |
| 171 // tests, it immediately runs the specified task on the current | 166 // tests, it immediately runs the specified task on the current |
| 172 // thread. | 167 // thread. |
| 173 bool RunTaskOnBackendThread(const tracked_objects::Location& from_here, | 168 bool RunTaskOnBackendThread(const tracked_objects::Location& from_here, |
| 174 const base::Closure& task); | 169 const base::Closure& task); |
| 175 | 170 |
| 176 // For metrics | 171 // For metrics |
| 177 void ResetContentStateReadingMetrics(); | 172 void ResetContentStateReadingMetrics(); |
| 178 void WriteContentStateReadingMetrics(); | 173 void WriteContentStateReadingMetrics(); |
| 179 | 174 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 209 // Whether to save the HTTP bodies of the POST requests. | 204 // Whether to save the HTTP bodies of the POST requests. |
| 210 bool save_post_data_; | 205 bool save_post_data_; |
| 211 | 206 |
| 212 // For metrics. | 207 // For metrics. |
| 213 base::TimeDelta time_spent_reading_compressed_content_states; | 208 base::TimeDelta time_spent_reading_compressed_content_states; |
| 214 | 209 |
| 215 DISALLOW_COPY_AND_ASSIGN(BaseSessionService); | 210 DISALLOW_COPY_AND_ASSIGN(BaseSessionService); |
| 216 }; | 211 }; |
| 217 | 212 |
| 218 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ | 213 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ |
| OLD | NEW |