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

Unified Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

Issue 6995074: [Mac] Don't copy text typed into the find bar to the find pasteboard in incognito windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index bd6e6183bdef8b6556b3d3d86a8d109b3fdd4779..9cfc1aaa13ee75ec426d0097b5d5b5076b82d5a1 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -4,8 +4,10 @@
#import <Cocoa/Cocoa.h>
+#include "base/auto_reset.h"
#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
@@ -170,9 +172,10 @@ const float kRightEdgeOffset = 25;
FindTabHelper* find_tab_helper = tab_contents->find_tab_helper();
NSString* findText = [findText_ stringValue];
- suppressPboardUpdateActions_ = YES;
- [[FindPasteboard sharedInstance] setFindText:findText];
- suppressPboardUpdateActions_ = NO;
+ if (!tab_contents->profile()->IsOffTheRecord()) {
Robert Sesek 2011/06/08 14:46:06 Add a comment that references this bug so it's mor
+ AutoReset<BOOL> auto_reset(&suppressPboardUpdateActions_, YES);
+ [[FindPasteboard sharedInstance] setFindText:findText];
+ }
if ([findText length] > 0) {
find_tab_helper->
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698