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

Side by Side Diff: content/renderer/renderer_main_platform_delegate_mac.mm

Issue 1133713009: Subject .mm files to the header sorting presubmit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase - of course... it would be one of my patches I conflict with :| Created 5 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
OLDNEW
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 "content/renderer/renderer_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <objc/runtime.h> 9 #include <objc/runtime.h>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/mac/mac_util.h" 13 #include "base/mac/mac_util.h"
14 #include "base/mac/scoped_cftyperef.h" 14 #include "base/mac/scoped_cftyperef.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/sys_string_conversions.h" 16 #include "base/strings/sys_string_conversions.h"
17 #include "content/common/sandbox_init_mac.h"
17 #include "content/common/sandbox_mac.h" 18 #include "content/common/sandbox_mac.h"
18 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
19 #include "content/common/sandbox_init_mac.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 namespace { 23 namespace {
24 24
25 // You are about to read a pretty disgusting hack. In a static initializer, 25 // You are about to read a pretty disgusting hack. In a static initializer,
26 // CoreFoundation decides to connect with cfprefsd(8) using Mach IPC. There is 26 // CoreFoundation decides to connect with cfprefsd(8) using Mach IPC. There is
27 // no public way to close this Mach port after-the-fact, nor a way to stop it 27 // no public way to close this Mach port after-the-fact, nor a way to stop it
28 // from happening since it is done pre-main in dyld. But the address of the 28 // from happening since it is done pre-main in dyld. But the address of the
29 // CFMachPort can be found in the run loop's string description. Below, that 29 // CFMachPort can be found in the run loop's string description. Below, that
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // The sandbox is now engaged. Make sure that the renderer has not connected 142 // The sandbox is now engaged. Make sure that the renderer has not connected
143 // itself to Cocoa. 143 // itself to Cocoa.
144 CHECK(NSApp == nil); 144 CHECK(NSApp == nil);
145 145
146 DisconnectCFNotificationCenter(); 146 DisconnectCFNotificationCenter();
147 147
148 return sandbox_initialized; 148 return sandbox_initialized;
149 } 149 }
150 150
151 } // namespace content 151 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_dest_mac.mm ('k') | content/shell/renderer/test_runner/helper/layout_test_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698