Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Side by Side Diff: chrome/browser/tabs/pinned_tab_service.h

Issue 6822063: Revert 81278 - Profile shouldn't own PinnedTabService.PinnedTabService is now owned by PinnedTabS... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TABS_PINNED_TAB_SERVICE_H_ 5 #ifndef CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
6 #define CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_ 6 #define CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/profiles/profile_keyed_service.h"
10 #include "content/common/notification_observer.h" 9 #include "content/common/notification_observer.h"
11 #include "content/common/notification_registrar.h" 10 #include "content/common/notification_registrar.h"
12 11
13 class Profile; 12 class Profile;
14 13
15 // PinnedTabService is responsible for updating preferences with the set of 14 // PinnedTabService is responsible for updating preferences with the set of
16 // pinned tabs to restore at startup. PinnedTabService listens for the 15 // pinned tabs to restore at startup. PinnedTabService listens for the
17 // appropriate set of notifications to know it should update preferences. 16 // appropriate set of notifications to know it should update preferences.
18 class PinnedTabService : public NotificationObserver, 17 class PinnedTabService : public NotificationObserver {
19 public ProfileKeyedService {
20 public: 18 public:
21 explicit PinnedTabService(Profile* profile); 19 explicit PinnedTabService(Profile* profile);
22 20
23 private: 21 private:
24 // Invoked when we're about to exit. 22 // Invoked when we're about to exit.
25 void GotExit(); 23 void GotExit();
26 24
27 // NotificationObserver. 25 // NotificationObserver.
28 virtual void Observe(NotificationType type, 26 virtual void Observe(NotificationType type,
29 const NotificationSource& source, 27 const NotificationSource& source,
30 const NotificationDetails& details); 28 const NotificationDetails& details);
31 29
32 Profile* profile_; 30 Profile* profile_;
33 31
34 // If true we've seen an exit event (or the last browser is closing which 32 // If true we've seen an exit event (or the last browser is closing which
35 // triggers an exit) and can ignore all other events. 33 // triggers an exit) and can ignore all other events.
36 bool got_exiting_; 34 bool got_exiting_;
37 35
38 // True if there is at least one normal browser for our profile. 36 // True if there is at least one normal browser for our profile.
39 bool has_normal_browser_; 37 bool has_normal_browser_;
40 38
41 NotificationRegistrar registrar_; 39 NotificationRegistrar registrar_;
42 40
43 DISALLOW_COPY_AND_ASSIGN(PinnedTabService); 41 DISALLOW_COPY_AND_ASSIGN(PinnedTabService);
44 }; 42 };
45 43
46 #endif // CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_ 44 #endif // CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/tabs/pinned_tab_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698