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

Side by Side Diff: chrome/browser/mach_broker_mac.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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_MACH_BROKER_H_ 5 #ifndef CHROME_BROWSER_MACH_BROKER_H_
6 #define CHROME_BROWSER_MACH_BROKER_H_ 6 #define CHROME_BROWSER_MACH_BROKER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Implement |ProcessMetrics::PortProvider|. 79 // Implement |ProcessMetrics::PortProvider|.
80 virtual mach_port_t TaskForPid(base::ProcessHandle process) const; 80 virtual mach_port_t TaskForPid(base::ProcessHandle process) const;
81 81
82 // Implement |NotificationObserver|. 82 // Implement |NotificationObserver|.
83 virtual void Observe(NotificationType type, 83 virtual void Observe(NotificationType type,
84 const NotificationSource& source, 84 const NotificationSource& source,
85 const NotificationDetails& details); 85 const NotificationDetails& details);
86 private: 86 private:
87 // Private constructor. 87 // Private constructor.
88 MachBroker(); 88 MachBroker();
89 ~MachBroker(); 89 virtual ~MachBroker();
90 90
91 // True if the listener thread has been started. 91 // True if the listener thread has been started.
92 bool listener_thread_started_; 92 bool listener_thread_started_;
93 93
94 // Used to register for notifications received by NotificationObserver. 94 // Used to register for notifications received by NotificationObserver.
95 // Accessed only on the UI thread. 95 // Accessed only on the UI thread.
96 NotificationRegistrar registrar_; 96 NotificationRegistrar registrar_;
97 97
98 // Stores mach info for every process in the broker. 98 // Stores mach info for every process in the broker.
99 typedef std::map<base::ProcessHandle, MachInfo> MachMap; 99 typedef std::map<base::ProcessHandle, MachInfo> MachMap;
100 MachMap mach_map_; 100 MachMap mach_map_;
101 101
102 // Mutex that guards |mach_map_|. 102 // Mutex that guards |mach_map_|.
103 mutable base::Lock lock_; 103 mutable base::Lock lock_;
104 104
105 friend class MachBrokerTest; 105 friend class MachBrokerTest;
106 friend class RegisterNotificationTask; 106 friend class RegisterNotificationTask;
107 // Needed in order to make the constructor private. 107 // Needed in order to make the constructor private.
108 friend struct DefaultSingletonTraits<MachBroker>; 108 friend struct DefaultSingletonTraits<MachBroker>;
109 DISALLOW_COPY_AND_ASSIGN(MachBroker); 109 DISALLOW_COPY_AND_ASSIGN(MachBroker);
110 }; 110 };
111 111
112 #endif // CHROME_BROWSER_MACH_BROKER_H_ 112 #endif // CHROME_BROWSER_MACH_BROKER_H_
113
OLDNEW
« no previous file with comments | « chrome/browser/intranet_redirect_detector.h ('k') | chrome/browser/nacl_host/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698