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

Unified Diff: chrome/browser/intents/native_services.cc

Issue 12225076: Delete most web intents code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
Index: chrome/browser/intents/native_services.cc
diff --git a/chrome/browser/intents/native_services.cc b/chrome/browser/intents/native_services.cc
deleted file mode 100644
index 46e2d19e769e44394ba1539932d900a5fba5d5be..0000000000000000000000000000000000000000
--- a/chrome/browser/intents/native_services.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/string16.h"
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/intents/native_services.h"
-#include "chrome/browser/intents/web_intents_util.h"
-#include "chrome/common/chrome_switches.h"
-#include "googleurl/src/gurl.h"
-#include "webkit/glue/web_intent_service_data.h"
-
-namespace web_intents {
-
-#define NATIVE_SCHEME "chrome-intents-native"
-
-const char kChromeNativeSerivceScheme[] = NATIVE_SCHEME;
-const char kNativeFilePickerUrl[] = NATIVE_SCHEME "://file-picker";
-
-NativeServiceRegistry::NativeServiceRegistry() {}
-
-void NativeServiceRegistry::GetSupportedServices(
- const string16& action,
- IntentServiceList* services) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kWebIntentsNativeServicesEnabled))
- return;
-
-#if !defined(ANDROID)
- if (EqualsASCII(action, web_intents::kActionPick)) {
- // File picker registrations.
- webkit_glue::WebIntentServiceData service(
- ASCIIToUTF16(kActionPick),
- ASCIIToUTF16("*/*"), // handle any MIME-type
- string16(),
- GURL(web_intents::kNativeFilePickerUrl),
- FilePickerFactory::GetServiceTitle());
- service.disposition = webkit_glue::WebIntentServiceData::DISPOSITION_NATIVE;
-
- services->push_back(service);
- }
-#endif
-}
-
-NativeServiceFactory::NativeServiceFactory() {}
-
-IntentServiceHost* NativeServiceFactory::CreateServiceInstance(
- const GURL& service_url,
- const webkit_glue::WebIntentData& intent,
- content::WebContents* web_contents) {
-
-#if !defined(ANDROID)
- if (service_url.spec() == kNativeFilePickerUrl) {
- return FilePickerFactory::CreateServiceInstance(intent, web_contents);
- }
-#endif
-
- return NULL; // couldn't create instance
-}
-
-} // namespace web_intents

Powered by Google App Engine
This is Rietveld 408576698