summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorkuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-24 17:34:08 +0000
committerkuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-24 17:34:08 +0000
commitf50278cd30e63f2deddd6989a93ed2c28134bcd5 (patch)
tree7e7630856bdf77cb96b443eb9f6f65a75b990ec7 /chrome/browser/profile.cc
parenta60aca40a6f65cdbe2533ebf2b2a4caf885a6c41 (diff)
downloadchromium_src-f50278cd30e63f2deddd6989a93ed2c28134bcd5.zip
chromium_src-f50278cd30e63f2deddd6989a93ed2c28134bcd5.tar.gz
chromium_src-f50278cd30e63f2deddd6989a93ed2c28134bcd5.tar.bz2
chromeos: 1st draft of ProxyConfigService for chromeos
what this cl is: - a REALLY bare skeleton implementation of ProxyConfigService for chromeos (lots of design details remain to be worked out on the chromeos side, but i needed to get something basic up) - focused on getting chrome part correct, extracting design flow and implementation from linux variant that are relevant to chromeos, e.g.: - provide access of ProxyConfigService interface on IO thread - provide methods on UI thread for UI to read/modify proxy config (like linux's GConf notifications on UI thread) - fetch initial config on UI thread (this is not absolutely necessary for chromeos, 'cos i don't use GConf, but i just follow linux for now) - however, the class is RefCountedThreadSafe (so that both net::ProxyService and DOMUI can access it), and the code resides in chrome/browser/chromeos dir instead of net/proxy. - design details are in .h files - initial config is hardcoded as pac script and loaded as owner (TODO: load this from cros settings persisted on chromeos device) - this should work like the current chromeos session manager which sets the auto-proxy environment variable in login script to the same pac script - implement an augmented analogue to net::ProxyConfig to hold actual proxy config and UI settings (e.g. source and readonly attributes) - backend uses this as the main proxy config, and only converts it to net:::ProxyConfig for network stack on the IO thread in net::ProxyService::GetLatestProxyConfig. - UI methods also use this structure - provide methods to get and set configs from UI thread - UI can use dom_ui->GetProfile()->GetChromeOSProxyConfigServiceImpl() to access these methods on the UI thread - these methods are by no means final - i only added them here to verify the design flow that modifications can be made from UI thread and picked up by IO thread. - david and i will improve or modify them to whatever works best for frontend and backend. - unittest that tests most functionalities: socks and bypass_rules will be enabled in a later cl. TODOs after this cl: - work with UI, load initial config as owner from cros settings - implement policy mechanism, merge it with owner during initial load and modifications - persist proxy settings - etc etc etc BUG=chromium-os:5127 TEST=nothing yet. Review URL: http://codereview.chromium.org/3047052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 51d74f0..116b645 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -487,6 +487,13 @@ class OffTheRecordProfileImpl : public Profile,
last_selected_directory_ = path;
}
+#if defined(OS_CHROMEOS)
+ virtual chromeos::ProxyConfigServiceImpl*
+ GetChromeOSProxyConfigServiceImpl() {
+ return profile_->GetChromeOSProxyConfigServiceImpl();
+ }
+#endif // defined(OS_CHROMEOS)
+
virtual void ExitedOffTheRecordMode() {
// Drop our download manager so we forget about all the downloads made
// in off-the-record mode.