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

Unified Diff: content/browser/intents/intent_injector.cc

Issue 10387155: Web Intents: Remove the flag and compile-time define. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « chrome/browser/webdata/web_intents_table_unittest.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/intents/intent_injector.cc
diff --git a/content/browser/intents/intent_injector.cc b/content/browser/intents/intent_injector.cc
index 1b44df180fda70770ebe32607723ab06d3445bec..a2818755d0ba0438da9f29bd9a5f75b1fa028998 100644
--- a/content/browser/intents/intent_injector.cc
+++ b/content/browser/intents/intent_injector.cc
@@ -66,12 +66,8 @@ void IntentInjector::OnSendReturnMessage(
}
void IntentInjector::RenderViewCreated(RenderViewHost* render_view_host) {
- if (source_intent_.get() == NULL ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableWebIntents) ||
- web_contents()->GetRenderViewHost() == NULL) {
+ if (source_intent_.get() == NULL || !web_contents()->GetRenderViewHost())
return;
- }
// Only deliver the intent to the renderer if it has the same origin
// as the initial delivery target.
@@ -102,13 +98,11 @@ bool IntentInjector::OnMessageReceived(const IPC::Message& message) {
void IntentInjector::OnReply(webkit_glue::WebIntentReplyType reply_type,
const string16& data) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableWebIntents))
- NOTREACHED();
+ if (!intents_dispatcher_)
+ return;
- if (intents_dispatcher_) {
- // Ensure we only call SendReplyMessage once.
- content::WebIntentsDispatcher* intents_dispatcher = intents_dispatcher_;
- intents_dispatcher_ = NULL;
- intents_dispatcher->SendReplyMessage(reply_type, data);
- }
+ // Ensure SendReplyMessage is only called once.
+ content::WebIntentsDispatcher* intents_dispatcher = intents_dispatcher_;
+ intents_dispatcher_ = NULL;
+ intents_dispatcher->SendReplyMessage(reply_type, data);
}
« no previous file with comments | « chrome/browser/webdata/web_intents_table_unittest.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698