| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SESSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // from the state of the browser. | 340 // from the state of the browser. |
| 341 void ScheduleReset(); | 341 void ScheduleReset(); |
| 342 | 342 |
| 343 // Searches for a pending command that can be replaced with command. | 343 // Searches for a pending command that can be replaced with command. |
| 344 // If one is found, pending command is removed, command is added to | 344 // If one is found, pending command is removed, command is added to |
| 345 // the pending commands and true is returned. | 345 // the pending commands and true is returned. |
| 346 bool ReplacePendingCommand(SessionCommand* command); | 346 bool ReplacePendingCommand(SessionCommand* command); |
| 347 | 347 |
| 348 // Schedules the specified command. This method takes ownership of the | 348 // Schedules the specified command. This method takes ownership of the |
| 349 // command. | 349 // command. |
| 350 void ScheduleCommand(SessionCommand* command); | 350 virtual void ScheduleCommand(SessionCommand* command); |
| 351 | 351 |
| 352 // Converts all pending tab/window closes to commands and schedules them. | 352 // Converts all pending tab/window closes to commands and schedules them. |
| 353 void CommitPendingCloses(); | 353 void CommitPendingCloses(); |
| 354 | 354 |
| 355 // Returns true if there is only one window open with a single tab that shares | 355 // Returns true if there is only one window open with a single tab that shares |
| 356 // our profile. | 356 // our profile. |
| 357 bool IsOnlyOneTabLeft(); | 357 bool IsOnlyOneTabLeft(); |
| 358 | 358 |
| 359 // Returns true if there are open trackable browser windows whose ids do | 359 // Returns true if there are open trackable browser windows whose ids do |
| 360 // match |window_id| with our profile. A trackable window is a window from | 360 // match |window_id| with our profile. A trackable window is a window from |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 452 |
| 453 // Constants used in calculating histogram data. | 453 // Constants used in calculating histogram data. |
| 454 const base::TimeDelta save_delay_in_millis_; | 454 const base::TimeDelta save_delay_in_millis_; |
| 455 const base::TimeDelta save_delay_in_mins_; | 455 const base::TimeDelta save_delay_in_mins_; |
| 456 const base::TimeDelta save_delay_in_hrs_; | 456 const base::TimeDelta save_delay_in_hrs_; |
| 457 | 457 |
| 458 DISALLOW_COPY_AND_ASSIGN(SessionService); | 458 DISALLOW_COPY_AND_ASSIGN(SessionService); |
| 459 }; | 459 }; |
| 460 | 460 |
| 461 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 461 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| OLD | NEW |