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

Unified Diff: chrome/browser/profile.cc

Issue 19613: Merge 8764 - Add support for UA spoofing, and spoof Safari's UA string when l... (Closed) Base URL: svn://chrome-svn/chrome/branches/release_154.next/src/
Patch Set: Created 11 years, 11 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
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
===================================================================
--- chrome/browser/profile.cc (revision 8772)
+++ chrome/browser/profile.cc (working copy)
@@ -105,8 +105,6 @@
: prefs_(prefs) {
cookie_store_ = NULL;
- // setup user agent
- user_agent_ = webkit_glue::GetUserAgent();
// set up Accept-Language and Accept-Charset header values
// TODO(jungshik) : This may slow down http requests. Perhaps,
// we have to come up with a better way to set up these values.
@@ -156,6 +154,11 @@
prefs_->AddPrefObserver(prefs::kCookieBehavior, this);
}
+ const std::string& GetUserAgent(
darin (slow to review) 2009/01/28 09:15:01 nit: the line break here should probably be remove
+ const GURL& url) const {
+ return webkit_glue::GetUserAgent(url);
+ }
+
// NotificationObserver implementation.
virtual void Observe(NotificationType type,
const NotificationSource& source,
@@ -251,7 +254,6 @@
cookie_store_ = new net::CookieMonster;
cookie_policy_.SetType(net::CookiePolicy::FromInt(
prefs_->GetInteger(prefs::kCookieBehavior)));
- user_agent_ = original_context_->user_agent();
accept_language_ = original_context_->accept_language();
accept_charset_ = original_context_->accept_charset();
is_off_the_record_ = true;
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698