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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 11411071: chromeos: Remove GViewRequestInterceptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete GViewRequestInterceptor Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/profile_startup.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "net/proxy/proxy_script_fetcher_impl.h" 66 #include "net/proxy/proxy_script_fetcher_impl.h"
67 #include "net/proxy/proxy_service.h" 67 #include "net/proxy/proxy_service.h"
68 #include "net/url_request/data_protocol_handler.h" 68 #include "net/url_request/data_protocol_handler.h"
69 #include "net/url_request/file_protocol_handler.h" 69 #include "net/url_request/file_protocol_handler.h"
70 #include "net/url_request/ftp_protocol_handler.h" 70 #include "net/url_request/ftp_protocol_handler.h"
71 #include "net/url_request/url_request.h" 71 #include "net/url_request/url_request.h"
72 #include "net/url_request/url_request_job_factory_impl.h" 72 #include "net/url_request/url_request_job_factory_impl.h"
73 73
74 #if defined(OS_CHROMEOS) 74 #if defined(OS_CHROMEOS)
75 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" 75 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h"
76 #include "chrome/browser/chromeos/gview_request_interceptor.h"
77 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 76 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
78 #include "chrome/browser/chromeos/settings/cros_settings.h" 77 #include "chrome/browser/chromeos/settings/cros_settings.h"
79 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 78 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
80 #endif // defined(OS_CHROMEOS) 79 #endif // defined(OS_CHROMEOS)
81 80
82 using content::BrowserContext; 81 using content::BrowserContext;
83 using content::BrowserThread; 82 using content::BrowserThread;
84 using content::ResourceContext; 83 using content::ResourceContext;
85 84
86 namespace { 85 namespace {
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 DCHECK(set_protocol); 645 DCHECK(set_protocol);
647 set_protocol = job_factory->SetProtocolHandler( 646 set_protocol = job_factory->SetProtocolHandler(
648 chrome::kDataScheme, new net::DataProtocolHandler()); 647 chrome::kDataScheme, new net::DataProtocolHandler());
649 DCHECK(set_protocol); 648 DCHECK(set_protocol);
650 #if defined(OS_CHROMEOS) 649 #if defined(OS_CHROMEOS)
651 if (!is_incognito()) { 650 if (!is_incognito()) {
652 set_protocol = job_factory->SetProtocolHandler( 651 set_protocol = job_factory->SetProtocolHandler(
653 chrome::kDriveScheme, new drive::DriveProtocolHandler()); 652 chrome::kDriveScheme, new drive::DriveProtocolHandler());
654 DCHECK(set_protocol); 653 DCHECK(set_protocol);
655 } 654 }
656 #if !defined(GOOGLE_CHROME_BUILD)
657 // Install the GView request interceptor that will redirect requests
658 // of compatible documents (PDF, etc) to the GView document viewer.
659 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
660 if (parsed_command_line.HasSwitch(switches::kEnableGView))
661 job_factory->AddInterceptor(new chromeos::GViewRequestInterceptor);
662 #endif // !defined(GOOGLE_CHROME_BUILD)
663 #endif // defined(OS_CHROMEOS) 655 #endif // defined(OS_CHROMEOS)
664 656
665 job_factory->SetProtocolHandler( 657 job_factory->SetProtocolHandler(
666 chrome::kAboutScheme, 658 chrome::kAboutScheme,
667 new chrome_browser_net::AboutProtocolHandler()); 659 new chrome_browser_net::AboutProtocolHandler());
668 #if !defined(DISABLE_FTP_SUPPORT) 660 #if !defined(DISABLE_FTP_SUPPORT)
669 DCHECK(ftp_transaction_factory); 661 DCHECK(ftp_transaction_factory);
670 job_factory->SetProtocolHandler( 662 job_factory->SetProtocolHandler(
671 chrome::kFtpScheme, 663 chrome::kFtpScheme,
672 new net::FtpProtocolHandler(ftp_transaction_factory, 664 new net::FtpProtocolHandler(ftp_transaction_factory,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 void ProfileIOData::SetCookieSettingsForTesting( 741 void ProfileIOData::SetCookieSettingsForTesting(
750 CookieSettings* cookie_settings) { 742 CookieSettings* cookie_settings) {
751 DCHECK(!cookie_settings_.get()); 743 DCHECK(!cookie_settings_.get());
752 cookie_settings_ = cookie_settings; 744 cookie_settings_ = cookie_settings;
753 } 745 }
754 746
755 void ProfileIOData::set_signin_names_for_testing( 747 void ProfileIOData::set_signin_names_for_testing(
756 SigninNamesOnIOThread* signin_names) { 748 SigninNamesOnIOThread* signin_names) {
757 signin_names_.reset(signin_names); 749 signin_names_.reset(signin_names);
758 } 750 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profile_startup.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698