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

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

Issue 17769005: Rewrite scoped_ptr<T>(NULL) to use the default ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_service_mac.mm » ('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) 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 #import "base/auto_reset.h" 7 #import "base/auto_reset.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #import "base/logging.h" 10 #import "base/logging.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // exceptions and Chromium cannot fix them. This provides a way to 399 // exceptions and Chromium cannot fix them. This provides a way to
400 // work around those on a spot basis. 400 // work around those on a spot basis.
401 bool enableNSExceptions = false; 401 bool enableNSExceptions = false;
402 402
403 // http://crbug.com/80686 , an Epson printer driver. 403 // http://crbug.com/80686 , an Epson printer driver.
404 if (anAction == @selector(selectPDE:)) { 404 if (anAction == @selector(selectPDE:)) {
405 enableNSExceptions = true; 405 enableNSExceptions = true;
406 } 406 }
407 407
408 // Minimize the window by keeping this close to the super call. 408 // Minimize the window by keeping this close to the super call.
409 scoped_ptr<base::mac::ScopedNSExceptionEnabler> enabler(NULL); 409 scoped_ptr<base::mac::ScopedNSExceptionEnabler> enabler;
410 if (enableNSExceptions) 410 if (enableNSExceptions)
411 enabler.reset(new base::mac::ScopedNSExceptionEnabler()); 411 enabler.reset(new base::mac::ScopedNSExceptionEnabler());
412 return [super sendAction:anAction to:aTarget from:sender]; 412 return [super sendAction:anAction to:aTarget from:sender];
413 } 413 }
414 414
415 - (BOOL)isHandlingSendEvent { 415 - (BOOL)isHandlingSendEvent {
416 return handlingSendEvent_; 416 return handlingSendEvent_;
417 } 417 }
418 418
419 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 419 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 std::vector<NSWindow*>::iterator window_iterator = 571 std::vector<NSWindow*>::iterator window_iterator =
572 std::find(previousKeyWindows_.begin(), 572 std::find(previousKeyWindows_.begin(),
573 previousKeyWindows_.end(), 573 previousKeyWindows_.end(),
574 window); 574 window);
575 if (window_iterator != previousKeyWindows_.end()) { 575 if (window_iterator != previousKeyWindows_.end()) {
576 previousKeyWindows_.erase(window_iterator); 576 previousKeyWindows_.erase(window_iterator);
577 } 577 }
578 } 578 }
579 579
580 @end 580 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698