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 #include "chrome/browser/sessions/session_service.h" | 5 #include "chrome/browser/sessions/session_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/pickle.h" | 17 #include "base/pickle.h" |
18 #include "base/threading/thread.h" | 18 #include "base/threading/thread.h" |
19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/extensions/tab_helper.h" | 20 #include "chrome/browser/extensions/tab_helper.h" |
21 #include "chrome/browser/prefs/session_startup_pref.h" | 21 #include "chrome/browser/prefs/session_startup_pref.h" |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/sessions/session_backend.h" | 23 #include "chrome/browser/sessions/session_backend.h" |
24 #include "chrome/browser/sessions/session_command.h" | 24 #include "chrome/browser/sessions/session_command.h" |
25 #include "chrome/browser/sessions/session_restore.h" | 25 #include "chrome/browser/sessions/session_restore.h" |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 contents->GetController().GetDefaultSessionStorageNamespace(); | 1755 contents->GetController().GetDefaultSessionStorageNamespace(); |
1756 session_storage_namespace->SetShouldPersist(false); | 1756 session_storage_namespace->SetShouldPersist(false); |
1757 SessionTabHelper* session_tab_helper = | 1757 SessionTabHelper* session_tab_helper = |
1758 SessionTabHelper::FromWebContents(contents); | 1758 SessionTabHelper::FromWebContents(contents); |
1759 TabClosed(session_tab_helper->window_id(), | 1759 TabClosed(session_tab_helper->window_id(), |
1760 session_tab_helper->session_id(), | 1760 session_tab_helper->session_id(), |
1761 contents->GetClosedByUserGesture()); | 1761 contents->GetClosedByUserGesture()); |
1762 RecordSessionUpdateHistogramData(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, | 1762 RecordSessionUpdateHistogramData(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
1763 &last_updated_tab_closed_time_); | 1763 &last_updated_tab_closed_time_); |
1764 } | 1764 } |
OLD | NEW |