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

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

Issue 3120021: FBTF: Header cleanup in chrome/common part 2. The majority of the changed files (Closed)
Patch Set: Win fix 2. Created 10 years, 4 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
« no previous file with comments | « chrome/browser/intranet_redirect_detector.h ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 10
11 #include <mach/mach.h> 11 #include <mach/mach.h>
12 12
13 #include "base/lock.h" 13 #include "base/lock.h"
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "base/process_util.h" 15 #include "base/process_util.h"
16 #include "base/singleton.h" 16 #include "base/singleton.h"
17 #include "chrome/common/notification_observer.h"
17 #include "chrome/common/notification_registrar.h" 18 #include "chrome/common/notification_registrar.h"
18 19
19 // On OS X, the mach_port_t of a process is required to collect metrics about 20 // On OS X, the mach_port_t of a process is required to collect metrics about
20 // the process. Running |task_for_pid()| is only allowed for privileged code. 21 // the process. Running |task_for_pid()| is only allowed for privileged code.
21 // However, a process has port rights to all its subprocesses, so let the 22 // However, a process has port rights to all its subprocesses, so let the
22 // browser's child processes send their Mach port to the browser over IPC. 23 // browser's child processes send their Mach port to the browser over IPC.
23 // This way, the brower can at least collect metrics of its child processes, 24 // This way, the brower can at least collect metrics of its child processes,
24 // which is what it's most interested in anyway. 25 // which is what it's most interested in anyway.
25 // 26 //
26 // Mach ports can only be sent over Mach IPC, not over the |socketpair()| that 27 // Mach ports can only be sent over Mach IPC, not over the |socketpair()| that
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 // Mutex that guards |mach_map_|. 79 // Mutex that guards |mach_map_|.
79 mutable Lock lock_; 80 mutable Lock lock_;
80 81
81 friend class RegisterNotificationTask; 82 friend class RegisterNotificationTask;
82 DISALLOW_COPY_AND_ASSIGN(MachBroker); 83 DISALLOW_COPY_AND_ASSIGN(MachBroker);
83 }; 84 };
84 85
85 #endif // CHROME_BROWSER_MACH_BROKER_H_ 86 #endif // CHROME_BROWSER_MACH_BROKER_H_
86 87
OLDNEW
« no previous file with comments | « chrome/browser/intranet_redirect_detector.h ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698