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

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

Issue 99433004: Add a header when fetching pages under the DMServer URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed per willchan's feedback Created 7 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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "net/ssl/client_cert_store_impl.h" 74 #include "net/ssl/client_cert_store_impl.h"
75 #include "net/ssl/server_bound_cert_service.h" 75 #include "net/ssl/server_bound_cert_service.h"
76 #include "net/url_request/data_protocol_handler.h" 76 #include "net/url_request/data_protocol_handler.h"
77 #include "net/url_request/file_protocol_handler.h" 77 #include "net/url_request/file_protocol_handler.h"
78 #include "net/url_request/ftp_protocol_handler.h" 78 #include "net/url_request/ftp_protocol_handler.h"
79 #include "net/url_request/protocol_intercept_job_factory.h" 79 #include "net/url_request/protocol_intercept_job_factory.h"
80 #include "net/url_request/url_request.h" 80 #include "net/url_request/url_request.h"
81 #include "net/url_request/url_request_file_job.h" 81 #include "net/url_request/url_request_file_job.h"
82 #include "net/url_request/url_request_job_factory_impl.h" 82 #include "net/url_request/url_request_job_factory_impl.h"
83 83
84 #if defined(ENABLE_CONFIGURATION_POLICY)
85 #include "chrome/browser/policy/cloud/policy_header_service.h"
86 #include "chrome/browser/policy/cloud/policy_header_service_factory.h"
87 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h"
88 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
89 #include "components/policy/core/browser/policy_header_io_helper.h"
90 #endif
91
84 #if defined(ENABLE_MANAGED_USERS) 92 #if defined(ENABLE_MANAGED_USERS)
85 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" 93 #include "chrome/browser/managed_mode/managed_mode_url_filter.h"
86 #include "chrome/browser/managed_mode/managed_user_service.h" 94 #include "chrome/browser/managed_mode/managed_user_service.h"
87 #include "chrome/browser/managed_mode/managed_user_service_factory.h" 95 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
88 #endif 96 #endif
89 97
90 #if defined(OS_CHROMEOS) 98 #if defined(OS_CHROMEOS)
91 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" 99 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h"
92 #include "chrome/browser/chromeos/login/user.h" 100 #include "chrome/browser/chromeos/login/user.h"
93 #include "chrome/browser/chromeos/login/user_manager.h" 101 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 #if defined(OS_CHROMEOS) 471 #if defined(OS_CHROMEOS)
464 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); 472 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile);
465 #endif 473 #endif
466 // The URLBlacklistManager has to be created on the UI thread to register 474 // The URLBlacklistManager has to be created on the UI thread to register
467 // observers of |pref_service|, and it also has to clean up on 475 // observers of |pref_service|, and it also has to clean up on
468 // ShutdownOnUIThread to release these observers on the right thread. 476 // ShutdownOnUIThread to release these observers on the right thread.
469 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, 477 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up,
470 // in particular when this ProfileIOData isn't |initialized_| during deletion. 478 // in particular when this ProfileIOData isn't |initialized_| during deletion.
471 #if defined(ENABLE_CONFIGURATION_POLICY) 479 #if defined(ENABLE_CONFIGURATION_POLICY)
472 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); 480 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service));
481
482 if (!is_incognito()) {
483 // Add policy headers for non-incognito requests.
484 policy::PolicyHeaderService* policy_header_service =
485 policy::PolicyHeaderServiceFactory::GetForBrowserContext(profile);
486 if (policy_header_service) {
487 policy_header_helper_ = policy_header_service->CreatePolicyHeaderIOHelper(
488 io_message_loop_proxy);
489 }
490 }
473 #endif 491 #endif
474 492
475 initialized_on_UI_thread_ = true; 493 initialized_on_UI_thread_ = true;
476 494
477 // We need to make sure that content initializes its own data structures that 495 // We need to make sure that content initializes its own data structures that
478 // are associated with each ResourceContext because we might post this 496 // are associated with each ResourceContext because we might post this
479 // object to the IO thread after this function. 497 // object to the IO thread after this function.
480 BrowserContext::EnsureResourceContextInitialized(profile); 498 BrowserContext::EnsureResourceContextInitialized(profile);
481 } 499 }
482 500
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 void ProfileIOData::SetCookieSettingsForTesting( 1136 void ProfileIOData::SetCookieSettingsForTesting(
1119 CookieSettings* cookie_settings) { 1137 CookieSettings* cookie_settings) {
1120 DCHECK(!cookie_settings_.get()); 1138 DCHECK(!cookie_settings_.get());
1121 cookie_settings_ = cookie_settings; 1139 cookie_settings_ = cookie_settings;
1122 } 1140 }
1123 1141
1124 void ProfileIOData::set_signin_names_for_testing( 1142 void ProfileIOData::set_signin_names_for_testing(
1125 SigninNamesOnIOThread* signin_names) { 1143 SigninNamesOnIOThread* signin_names) {
1126 signin_names_.reset(signin_names); 1144 signin_names_.reset(signin_names);
1127 } 1145 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698