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

Unified Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 10985083: Upstreaming SpdyProxy-related switches, OTR logic, and histograms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed non-change from pref_names.h Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index a05c6dcb20563366a7c950f9963cb91ce159d162..ebf48a0c7647ce22ff7f3b80263bfd2d1d9a56ae 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -54,6 +54,10 @@
#include "net/http/http_server_properties.h"
#include "webkit/database/database_tracker.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/prefs/scoped_user_pref_update.h"
+#endif
+
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/preferences.h"
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
@@ -84,6 +88,9 @@ OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile)
prefs_(real_profile->GetOffTheRecordPrefs()),
ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)),
start_time_(Time::Now()) {
+#if defined(OS_ANDROID)
+ UseSystemProxy();
Lei Zhang 2012/10/02 00:25:14 I'm not that familiar with OTR profiles. Does this
bengr (incorrect) 2012/10/02 18:19:01 Done.
+#endif
}
void OffTheRecordProfileImpl::Init() {
@@ -157,6 +164,22 @@ void OffTheRecordProfileImpl::InitHostZoomMap() {
content::Source<HostZoomMap>(parent_host_zoom_map));
}
+#if defined(OS_ANDROID)
+void OffTheRecordProfileImpl::UseSystemProxy() {
rpetterson 2012/10/01 20:40:15 I like this better, but I think it should be defin
+ // Force the use of the system-assigned proxy when off the record.
+ const char kProxyMode[] = "mode";
+ const char kProxyServer[] = "server";
+ const char kProxyBypassList[] = "bypass_list";
+ const char kProxyPacUrl[] = "pac_url";
+ DictionaryPrefUpdate update(prefs_, prefs::kProxy);
+ DictionaryValue* dict = update.Get();
+ dict->SetString(kProxyMode, ProxyModeToString(ProxyPrefs::MODE_SYSTEM));
+ dict->SetString(kProxyPacUrl, "");
+ dict->SetString(kProxyServer, "");
+ dict->SetString(kProxyBypassList, "");
+}
+#endif // defined(OS_ANDROID)
+
std::string OffTheRecordProfileImpl::GetProfileName() {
// Incognito profile should not return the profile name.
return std::string();

Powered by Google App Engine
This is Rietveld 408576698