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_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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
| 14 #include "base/memory/weak_ptr.h" |
14 #include "base/task/cancelable_task_tracker.h" | 15 #include "base/task/cancelable_task_tracker.h" |
15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
16 #include "chrome/browser/defaults.h" | 17 #include "chrome/browser/defaults.h" |
17 #include "chrome/browser/sessions/base_session_service.h" | 18 #include "chrome/browser/sessions/base_session_service.h" |
18 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_finder.h" | 20 #include "chrome/browser/ui/browser_finder.h" |
20 #include "chrome/browser/ui/browser_list_observer.h" | 21 #include "chrome/browser/ui/browser_list_observer.h" |
21 #include "components/keyed_service/core/keyed_service.h" | 22 #include "components/keyed_service/core/keyed_service.h" |
22 #include "components/sessions/session_id.h" | 23 #include "components/sessions/session_id.h" |
23 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 487 |
487 // Constants used in calculating histogram data. | 488 // Constants used in calculating histogram data. |
488 const base::TimeDelta save_delay_in_millis_; | 489 const base::TimeDelta save_delay_in_millis_; |
489 const base::TimeDelta save_delay_in_mins_; | 490 const base::TimeDelta save_delay_in_mins_; |
490 const base::TimeDelta save_delay_in_hrs_; | 491 const base::TimeDelta save_delay_in_hrs_; |
491 | 492 |
492 // For browser_tests, since we want to simulate the browser shutting down | 493 // For browser_tests, since we want to simulate the browser shutting down |
493 // without quitting. | 494 // without quitting. |
494 bool force_browser_not_alive_with_no_windows_; | 495 bool force_browser_not_alive_with_no_windows_; |
495 | 496 |
| 497 base::WeakPtrFactory<SessionService> weak_factory_; |
| 498 |
496 DISALLOW_COPY_AND_ASSIGN(SessionService); | 499 DISALLOW_COPY_AND_ASSIGN(SessionService); |
497 }; | 500 }; |
498 | 501 |
499 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 502 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
OLD | NEW |