diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-28 01:47:11 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-28 01:47:11 +0000 |
commit | aa01e59e265fc64cc51501401d5d6d0c1b2d2b2e (patch) | |
tree | f4cc0d6d8af3930ab442e1ae9802a7f8b8622d89 /chrome/browser/intents | |
parent | e8e410d2f494caca27e85c01e35b86b551e04ec4 (diff) | |
download | chromium_src-aa01e59e265fc64cc51501401d5d6d0c1b2d2b2e.zip chromium_src-aa01e59e265fc64cc51501401d5d6d0c1b2d2b2e.tar.gz chromium_src-aa01e59e265fc64cc51501401d5d6d0c1b2d2b2e.tar.bz2 |
Re-enable auto-defaulting for quickoffice if no other service is installed.
BUG=152590
Review URL: https://chromiumcodereview.appspot.com/10979046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/intents')
-rw-r--r-- | chrome/browser/intents/web_intents_registry.cc | 9 | ||||
-rw-r--r-- | chrome/browser/intents/web_intents_util.cc | 9 | ||||
-rw-r--r-- | chrome/browser/intents/web_intents_util.h | 15 |
3 files changed, 20 insertions, 13 deletions
diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc index 5b332a2..d59cefe 100644 --- a/chrome/browser/intents/web_intents_registry.cc +++ b/chrome/browser/intents/web_intents_registry.cc @@ -28,11 +28,6 @@ namespace { // TODO(hshi): Temporary workaround for http://crbug.com/134197. // If no user-set default service is found, use built-in QuickOffice Viewer as // default for MS office files. Remove this once full defaults is in place. -const char kViewActionURL[] = "http://webintents.org/view"; - -const char kQuickOfficeViewerServiceURL[] = - "chrome-extension://gbkeegbaiigmenfmjfclcdgdpimamgkj/views/appViewer.html"; - const char* kQuickOfficeViewerMimeType[] = { "application/msword", "application/vnd.ms-powerpoint", @@ -309,9 +304,9 @@ void WebIntentsRegistry::OnWebIntentsDefaultsResultReceived( for (size_t i = 0; i < sizeof(kQuickOfficeViewerMimeType) / sizeof(char*); ++i) { DefaultWebIntentService qoviewer_service; - qoviewer_service.action = ASCIIToUTF16(kViewActionURL); + qoviewer_service.action = ASCIIToUTF16(web_intents::kActionView); qoviewer_service.type = ASCIIToUTF16(kQuickOfficeViewerMimeType[i]); - qoviewer_service.service_url = kQuickOfficeViewerServiceURL; + qoviewer_service.service_url = web_intents::kQuickOfficeViewerServiceURL; if (WebIntentsTypesMatch(qoviewer_service.type, params.type_)) { default_service = qoviewer_service; break; diff --git a/chrome/browser/intents/web_intents_util.cc b/chrome/browser/intents/web_intents_util.cc index 68b70b5..2c59ce6 100644 --- a/chrome/browser/intents/web_intents_util.cc +++ b/chrome/browser/intents/web_intents_util.cc @@ -45,6 +45,15 @@ const ActionMapping* FindActionMapping(const string16& action) { } // namespace +const char kActionEdit[] = "http://webintents.org/edit"; +const char kActionPick[] = "http://webintents.org/pick"; +const char kActionSave[] = "http://webintents.org/save"; +const char kActionShare[] = "http://webintents.org/share"; +const char kActionSubscribe[] = "http://webintents.org/subscribe"; +const char kActionView[] = "http://webintents.org/view"; +const char kQuickOfficeViewerServiceURL[] = + "chrome-extension://gbkeegbaiigmenfmjfclcdgdpimamgkj/views/appViewer.html"; + void RegisterUserPrefs(PrefService* user_prefs) { user_prefs->RegisterBooleanPref(prefs::kWebIntentsEnabled, true, PrefService::SYNCABLE_PREF); diff --git a/chrome/browser/intents/web_intents_util.h b/chrome/browser/intents/web_intents_util.h index 912eff5..e9692dd 100644 --- a/chrome/browser/intents/web_intents_util.h +++ b/chrome/browser/intents/web_intents_util.h @@ -25,12 +25,15 @@ enum ActionId { // "Recognized" action strings. These are basically the // actions we're reporting via UMA. -const char kActionEdit[] = "http://webintents.org/edit"; -const char kActionPick[] = "http://webintents.org/pick"; -const char kActionSave[] = "http://webintents.org/save"; -const char kActionShare[] = "http://webintents.org/share"; -const char kActionSubscribe[] = "http://webintents.org/subscribe"; -const char kActionView[] = "http://webintents.org/view"; +extern const char kActionEdit[]; +extern const char kActionPick[]; +extern const char kActionSave[]; +extern const char kActionShare[]; +extern const char kActionSubscribe[]; +extern const char kActionView[]; + +// URL for QuickOffice viewer. +extern const char kQuickOfficeViewerServiceURL[]; // Registers the preferences related to Web Intents. void RegisterUserPrefs(PrefService* user_prefs); |