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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 9805005: [Web Intents] Fix crash when invoking intent in incognito mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
Index: chrome/browser/ui/intents/web_intent_picker_controller.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index 2f372045f44e1782c09d7b125922b10dee17f34a..6ea82471cf4c53904eb5ffa845e4a4d73ea40cd3 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -123,6 +123,11 @@ void WebIntentPickerController::ShowDialog(Browser* browser,
if (picker_shown_)
return;
+ // TODO(binji): Figure out what to do when intents are invoked from incognito
+ // mode.
+ if (wrapper_->profile()->IsOffTheRecord())
+ return;
+
picker_model_->Clear();
// If picker is non-NULL, it was set by a test.

Powered by Google App Engine
This is Rietveld 408576698