summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 10:18:52 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 10:18:52 +0000
commita1f7bba412d50a3939f495011bdd3bdf30fb3bf5 (patch)
treea1f2d6e68df4ee5ed39a7a1c67797c0dbeff85db /chrome/browser/profiles
parentabc2056e55ea99b6065acea7582127f8ed46f220 (diff)
downloadchromium_src-a1f7bba412d50a3939f495011bdd3bdf30fb3bf5.zip
chromium_src-a1f7bba412d50a3939f495011bdd3bdf30fb3bf5.tar.gz
chromium_src-a1f7bba412d50a3939f495011bdd3bdf30fb3bf5.tar.bz2
Remove ProtocolFactory/Interceptor uses in GViewRequestInterceptor.
Gets rid of more use of net/ globals, replacing with URLRequestJobFactory uses. Helps make net/ more thread-compatible. BUG=81979 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86802 Review URL: http://codereview.chromium.org/7019030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r--chrome/browser/profiles/profile_io_data.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index fae1711..c49efc2 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -49,6 +49,10 @@
#include "webkit/database/database_tracker.h"
#include "webkit/quota/quota_manager.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/gview_request_interceptor.h"
+#endif // defined(OS_CHROMEOS)
+
namespace {
// ----------------------------------------------------------------------------
@@ -457,6 +461,13 @@ void ProfileIOData::LazyInitialize() const {
profile_params_->file_system_context,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
DCHECK(set_protocol);
+#if defined(OS_CHROMEOS)
+ // Install the GView request interceptor that will redirect requests
+ // of compatible documents (PDF, etc) to the GView document viewer.
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
+ if (parsed_command_line.HasSwitch(switches::kEnableGView))
+ job_factory_->AddInterceptor(new chromeos::GViewRequestInterceptor);
+#endif // defined(OS_CHROMEOS)
// Take ownership over these parameters.
database_tracker_ = profile_params_->database_tracker;