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

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

Issue 661024: [Mac] Do not copy to the find pasteboard when in Incognito mode.... Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 10 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/cocoa/find_bar_cocoa_controller.mm
===================================================================
--- chrome/browser/cocoa/find_bar_cocoa_controller.mm (revision 39898)
+++ chrome/browser/cocoa/find_bar_cocoa_controller.mm (working copy)
@@ -7,6 +7,7 @@
#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/find_bar_controller.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/cocoa/browser_window_cocoa.h"
#import "chrome/browser/cocoa/find_bar_cocoa_controller.h"
#import "chrome/browser/cocoa/find_bar_bridge.h"
@@ -127,10 +128,14 @@
return;
NSString* findText = [findText_ stringValue];
- suppressPboardUpdateActions_ = YES;
- [[FindPasteboard sharedInstance] setFindText:findText];
- suppressPboardUpdateActions_ = NO;
+ // Do not update the find pasteboard if in Incognito mode.
+ if (!tab_contents->profile()->IsOffTheRecord()) {
+ suppressPboardUpdateActions_ = YES;
+ [[FindPasteboard sharedInstance] setFindText:findText];
+ suppressPboardUpdateActions_ = NO;
+ }
+
if ([findText length] > 0) {
tab_contents->StartFinding(base::SysNSStringToUTF16(findText), true, false);
} else {
« 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