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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 6549007: Make CrOS proxy configuration write prefs directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single proxy handling for real! Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/chromeos/cros/network_library.h" 25 #include "chrome/browser/chromeos/cros/network_library.h"
26 #include "chrome/browser/chromeos/input_method/input_method_util.h" 26 #include "chrome/browser/chromeos/input_method/input_method_util.h"
27 #include "chrome/browser/chromeos/login/background_view.h" 27 #include "chrome/browser/chromeos/login/background_view.h"
28 #include "chrome/browser/chromeos/login/cookie_fetcher.h" 28 #include "chrome/browser/chromeos/login/cookie_fetcher.h"
29 #include "chrome/browser/chromeos/login/google_authenticator.h" 29 #include "chrome/browser/chromeos/login/google_authenticator.h"
30 #include "chrome/browser/chromeos/login/language_switch_menu.h" 30 #include "chrome/browser/chromeos/login/language_switch_menu.h"
31 #include "chrome/browser/chromeos/login/ownership_service.h" 31 #include "chrome/browser/chromeos/login/ownership_service.h"
32 #include "chrome/browser/chromeos/login/parallel_authenticator.h" 32 #include "chrome/browser/chromeos/login/parallel_authenticator.h"
33 #include "chrome/browser/chromeos/login/user_image_downloader.h" 33 #include "chrome/browser/chromeos/login/user_image_downloader.h"
34 #include "chrome/browser/chromeos/login/user_manager.h" 34 #include "chrome/browser/chromeos/login/user_manager.h"
35 #include "chrome/browser/chromeos/proxy_config_service.h"
36 #include "chrome/browser/extensions/extension_service.h" 35 #include "chrome/browser/extensions/extension_service.h"
37 #include "chrome/browser/net/chrome_url_request_context.h" 36 #include "chrome/browser/net/chrome_url_request_context.h"
38 #include "chrome/browser/net/gaia/token_service.h" 37 #include "chrome/browser/net/gaia/token_service.h"
39 #include "chrome/browser/net/preconnect.h" 38 #include "chrome/browser/net/preconnect.h"
40 #include "chrome/browser/net/pref_proxy_config_service.h" 39 #include "chrome/browser/net/pref_proxy_config_service.h"
41 #include "chrome/browser/plugin_updater.h" 40 #include "chrome/browser/plugin_updater.h"
42 #include "chrome/browser/prefs/pref_member.h" 41 #include "chrome/browser/prefs/pref_member.h"
43 #include "chrome/browser/profiles/profile.h" 42 #include "chrome/browser/profiles/profile.h"
44 #include "chrome/browser/profiles/profile_manager.h" 43 #include "chrome/browser/profiles/profile_manager.h"
45 #include "chrome/browser/sync/profile_sync_service.h" 44 #include "chrome/browser/sync/profile_sync_service.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 { 231 {
233 // Loading user profile causes us to do blocking IO on UI thread. 232 // Loading user profile causes us to do blocking IO on UI thread.
234 // Temporarily allow it until we fix http://crosbug.com/11104 233 // Temporarily allow it until we fix http://crosbug.com/11104
235 base::ThreadRestrictions::ScopedAllowIO allow_io; 234 base::ThreadRestrictions::ScopedAllowIO allow_io;
236 // The default profile will have been changed because the ProfileManager 235 // The default profile will have been changed because the ProfileManager
237 // will process the notification that the UserManager sends out. 236 // will process the notification that the UserManager sends out.
238 profile = profile_manager->GetDefaultProfile(user_data_dir); 237 profile = profile_manager->GetDefaultProfile(user_data_dir);
239 } 238 }
240 btl->AddLoginTimeMarker("UserProfileGotten", false); 239 btl->AddLoginTimeMarker("UserProfileGotten", false);
241 240
241 #if 0
danno 2011/02/21 21:45:20 I assume this is because the CL is still a work in
Mattias Nissler (ping if slow) 2011/02/22 09:45:34 Ah, yes. I think I should remove this block. This
242 // Change the proxy configuration service of the default request context to 242 // Change the proxy configuration service of the default request context to
243 // use the preference configuration from the logged-in profile. This ensures 243 // use the preference configuration from the logged-in profile. This ensures
244 // that requests done through the default context use the proxy configuration 244 // that requests done through the default context use the proxy configuration
245 // provided by configuration policy. 245 // provided by configuration policy.
246 // 246 //
247 // Note: Many of the clients of the default request context should probably be 247 // Note: Many of the clients of the default request context should probably be
248 // fixed to use the request context of the profile they are associated with. 248 // fixed to use the request context of the profile they are associated with.
249 // This includes preconnect, autofill, metrics service to only name a few; 249 // This includes preconnect, autofill, metrics service to only name a few;
250 // see http://code.google.com/p/chromium/issues/detail?id=64339 for details. 250 // see http://code.google.com/p/chromium/issues/detail?id=64339 for details.
251 // 251 //
252 // TODO(mnissler) Revisit when support for device-specific policy arrives, at 252 // TODO(mnissler) Revisit when support for device-specific policy arrives, at
253 // which point the default request context can directly be managed through 253 // which point the default request context can directly be managed through
254 // device policy. 254 // device policy.
255 net::ProxyConfigService* proxy_config_service = 255 net::ProxyConfigService* proxy_config_service =
256 new PrefProxyConfigService( 256 new PrefProxyConfigService(
257 profile->GetProxyConfigTracker(), 257 profile->GetProxyConfigTracker(),
258 new chromeos::ProxyConfigService( 258 new chromeos::ProxyConfigService(
259 profile->GetChromeOSProxyConfigServiceImpl())); 259 profile->GetChromeOSProxyConfigServiceImpl()));
260 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 260 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
261 new ResetDefaultProxyConfigServiceTask( 261 new ResetDefaultProxyConfigServiceTask(
262 proxy_config_service)); 262 proxy_config_service));
263 #endif
263 264
264 // Since we're doing parallel authentication, only new user sign in 265 // Since we're doing parallel authentication, only new user sign in
265 // would perform online auth before calling CompleteLogin. 266 // would perform online auth before calling CompleteLogin.
266 // For existing users there's usually a pending online auth request. 267 // For existing users there's usually a pending online auth request.
267 // Cookies will be fetched after it's is succeeded. 268 // Cookies will be fetched after it's is succeeded.
268 if (!pending_requests) { 269 if (!pending_requests) {
269 FetchCookies(profile, credentials); 270 FetchCookies(profile, credentials);
270 } 271 }
271 272
272 // Init extension event routers; this normally happens in browser_main 273 // Init extension event routers; this normally happens in browser_main
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 BrowserInit browser_init; 575 BrowserInit browser_init;
575 int return_code; 576 int return_code;
576 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), 577 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(),
577 profile, 578 profile,
578 FilePath(), 579 FilePath(),
579 true, 580 true,
580 &return_code); 581 &return_code);
581 } 582 }
582 583
583 } // namespace chromeos 584 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/proxy_config_service.h » ('j') | chrome/browser/chromeos/proxy_config_service_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698