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

Side by Side Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 #import "chrome/browser/chrome_browser_application_mac.h" 5 #import "chrome/browser/chrome_browser_application_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Initialize NSApplication using the custom subclass. Check whether NSApp 68 // Initialize NSApplication using the custom subclass. Check whether NSApp
69 // was already initialized using another class, because that would break 69 // was already initialized using another class, because that would break
70 // some things. 70 // some things.
71 + (NSApplication*)sharedApplication { 71 + (NSApplication*)sharedApplication {
72 NSApplication* app = [super sharedApplication]; 72 NSApplication* app = [super sharedApplication];
73 73
74 // +sharedApplication initializes the global NSApp, so if a specific 74 // +sharedApplication initializes the global NSApp, so if a specific
75 // NSApplication subclass is requested, require that to be the one 75 // NSApplication subclass is requested, require that to be the one
76 // delivered. The practical effect is to require a consistent NSApp 76 // delivered. The practical effect is to require a consistent NSApp
77 // across the executable. 77 // across the executable.
78 CHECK([NSApp isKindOfClass:self]) 78 CHECK([NSApp isKindOfClass:self]);
79 << "NSApp must be of type " << [[self className] UTF8String]
80 << ", not " << [[NSApp className] UTF8String];
81 79
82 // If the message loop was initialized before NSApp is setup, the 80 // If the message loop was initialized before NSApp is setup, the
83 // message pump will be setup incorrectly. Failing this implies 81 // message pump will be setup incorrectly. Failing this implies
84 // that RegisterBrowserCrApp() should be called earlier. 82 // that RegisterBrowserCrApp() should be called earlier.
85 CHECK(base::MessagePumpMac::UsingCrApp()) 83 CHECK(base::MessagePumpMac::UsingCrApp());
86 << "MessagePumpMac::Create() is using the wrong pump implementation"
87 << " for " << [[self className] UTF8String];
88 84
89 return app; 85 return app;
90 } 86 }
91 87
92 //////////////////////////////////////////////////////////////////////////////// 88 ////////////////////////////////////////////////////////////////////////////////
93 // HISTORICAL COMMENT (by viettrungluu, from 89 // HISTORICAL COMMENT (by viettrungluu, from
94 // http://codereview.chromium.org/1520006 with mild editing): 90 // http://codereview.chromium.org/1520006 with mild editing):
95 // 91 //
96 // A quick summary of the state of things (before the changes to shutdown): 92 // A quick summary of the state of things (before the changes to shutdown):
97 // 93 //
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 - (void)_cycleWindowsReversed:(BOOL)arg1 { 292 - (void)_cycleWindowsReversed:(BOOL)arg1 {
297 base::AutoReset<BOOL> pin(&cyclingWindows_, YES); 293 base::AutoReset<BOOL> pin(&cyclingWindows_, YES);
298 [super _cycleWindowsReversed:arg1]; 294 [super _cycleWindowsReversed:arg1];
299 } 295 }
300 296
301 - (BOOL)isCyclingWindows { 297 - (BOOL)isCyclingWindows {
302 return cyclingWindows_; 298 return cyclingWindows_;
303 } 299 }
304 300
305 @end 301 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698