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

Side by Side Diff: chrome/browser/profile_impl.cc

Issue 5005002: Dynamically refresh pref-configured proxies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Eric's feedback. Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/profile_impl.h" 5 #include "chrome/browser/profile_impl.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chrome/browser/geolocation/geolocation_permission_context.h" 44 #include "chrome/browser/geolocation/geolocation_permission_context.h"
45 #include "chrome/browser/history/history.h" 45 #include "chrome/browser/history/history.h"
46 #include "chrome/browser/history/top_sites.h" 46 #include "chrome/browser/history/top_sites.h"
47 #include "chrome/browser/host_content_settings_map.h" 47 #include "chrome/browser/host_content_settings_map.h"
48 #include "chrome/browser/host_zoom_map.h" 48 #include "chrome/browser/host_zoom_map.h"
49 #include "chrome/browser/instant/instant_controller.h" 49 #include "chrome/browser/instant/instant_controller.h"
50 #include "chrome/browser/in_process_webkit/webkit_context.h" 50 #include "chrome/browser/in_process_webkit/webkit_context.h"
51 #include "chrome/browser/net/chrome_url_request_context.h" 51 #include "chrome/browser/net/chrome_url_request_context.h"
52 #include "chrome/browser/net/gaia/token_service.h" 52 #include "chrome/browser/net/gaia/token_service.h"
53 #include "chrome/browser/net/net_pref_observer.h" 53 #include "chrome/browser/net/net_pref_observer.h"
54 #include "chrome/browser/net/pref_proxy_config_service.h"
54 #include "chrome/browser/net/ssl_config_service_manager.h" 55 #include "chrome/browser/net/ssl_config_service_manager.h"
55 #include "chrome/browser/notifications/desktop_notification_service.h" 56 #include "chrome/browser/notifications/desktop_notification_service.h"
56 #include "chrome/browser/password_manager/password_store_default.h" 57 #include "chrome/browser/password_manager/password_store_default.h"
57 #include "chrome/browser/prefs/browser_prefs.h" 58 #include "chrome/browser/prefs/browser_prefs.h"
58 #include "chrome/browser/prefs/pref_value_store.h" 59 #include "chrome/browser/prefs/pref_value_store.h"
59 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 60 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
60 #include "chrome/browser/profile_manager.h" 61 #include "chrome/browser/profile_manager.h"
61 #include "chrome/browser/renderer_host/render_process_host.h" 62 #include "chrome/browser/renderer_host/render_process_host.h"
62 #include "chrome/browser/search_engines/template_url_fetcher.h" 63 #include "chrome/browser/search_engines/template_url_fetcher.h"
63 #include "chrome/browser/search_engines/template_url_model.h" 64 #include "chrome/browser/search_engines/template_url_model.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // FaviconService depends on HistoryServce so make sure we delete 550 // FaviconService depends on HistoryServce so make sure we delete
550 // HistoryService first. 551 // HistoryService first.
551 favicon_service_ = NULL; 552 favicon_service_ = NULL;
552 553
553 if (extension_message_service_) 554 if (extension_message_service_)
554 extension_message_service_->DestroyingProfile(); 555 extension_message_service_->DestroyingProfile();
555 556
556 if (extensions_service_) 557 if (extensions_service_)
557 extensions_service_->DestroyingProfile(); 558 extensions_service_->DestroyingProfile();
558 559
560 if (pref_proxy_config_tracker_)
561 pref_proxy_config_tracker_->Shutdown();
eroman 2010/11/20 03:19:07 For consistency with the callers I notice above, I
Mattias Nissler (ping if slow) 2010/11/21 22:49:14 There are others above named Shutdown, but I don't
562
559 // This causes the Preferences file to be written to disk. 563 // This causes the Preferences file to be written to disk.
560 MarkAsCleanShutdown(); 564 MarkAsCleanShutdown();
561 } 565 }
562 566
563 ProfileId ProfileImpl::GetRuntimeId() { 567 ProfileId ProfileImpl::GetRuntimeId() {
564 return reinterpret_cast<ProfileId>(this); 568 return reinterpret_cast<ProfileId>(this);
565 } 569 }
566 570
567 FilePath ProfileImpl::GetPath() { 571 FilePath ProfileImpl::GetPath() {
568 return path_; 572 return path_;
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 #if defined(OS_CHROMEOS) 1340 #if defined(OS_CHROMEOS)
1337 chromeos::ProxyConfigServiceImpl* 1341 chromeos::ProxyConfigServiceImpl*
1338 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { 1342 ProfileImpl::GetChromeOSProxyConfigServiceImpl() {
1339 if (!chromeos_proxy_config_service_impl_) { 1343 if (!chromeos_proxy_config_service_impl_) {
1340 chromeos_proxy_config_service_impl_ = 1344 chromeos_proxy_config_service_impl_ =
1341 new chromeos::ProxyConfigServiceImpl(); 1345 new chromeos::ProxyConfigServiceImpl();
1342 } 1346 }
1343 return chromeos_proxy_config_service_impl_; 1347 return chromeos_proxy_config_service_impl_;
1344 } 1348 }
1345 #endif // defined(OS_CHROMEOS) 1349 #endif // defined(OS_CHROMEOS)
1350
1351 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() {
1352 if (!pref_proxy_config_tracker_)
1353 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs());
1354
1355 return pref_proxy_config_tracker_;
1356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698