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 #include "chrome/browser/tabs/pinned_tab_service.h" | 5 #include "chrome/browser/tabs/pinned_tab_service.h" |
6 | 6 |
7 #include "chrome/browser/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/tabs/pinned_tab_codec.h" | 8 #include "chrome/browser/tabs/pinned_tab_codec.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
11 #include "chrome/common/notification_type.h" | 11 #include "chrome/common/notification_type.h" |
12 | 12 |
13 PinnedTabService::PinnedTabService(Profile* profile) | 13 PinnedTabService::PinnedTabService(Profile* profile) |
14 : profile_(profile), | 14 : profile_(profile), |
15 got_exiting_(false) { | 15 got_exiting_(false) { |
16 registrar_.Add(this, NotificationType::BROWSER_CLOSING, | 16 registrar_.Add(this, NotificationType::BROWSER_CLOSING, |
17 NotificationService::AllSources()); | 17 NotificationService::AllSources()); |
(...skipping 23 matching lines...) Expand all Loading... |
41 default: | 41 default: |
42 NOTREACHED(); | 42 NOTREACHED(); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 void PinnedTabService::GotExit() { | 46 void PinnedTabService::GotExit() { |
47 DCHECK(!got_exiting_); | 47 DCHECK(!got_exiting_); |
48 got_exiting_ = true; | 48 got_exiting_ = true; |
49 PinnedTabCodec::WritePinnedTabs(profile_); | 49 PinnedTabCodec::WritePinnedTabs(profile_); |
50 } | 50 } |
OLD | NEW |