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

Unified Diff: components/autofill/content/browser/risk/fingerprint.cc

Issue 191093002: Simplify the user agent code some more since after r255534 it's not affected by the site's URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: patchset 15 which works Created 6 years, 9 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 | « components/autofill/content/browser/risk/fingerprint.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/risk/fingerprint.cc
===================================================================
--- components/autofill/content/browser/risk/fingerprint.cc (revision 255867)
+++ components/autofill/content/browser/risk/fingerprint.cc (working copy)
@@ -263,6 +263,7 @@
const std::string& accept_languages,
const base::Time& install_time,
const std::string& app_locale,
+ const std::string& user_agent,
const base::TimeDelta& timeout,
const base::Callback<void(scoped_ptr<Fingerprint>)>& callback);
@@ -301,6 +302,8 @@
const std::string version_;
const std::string charset_;
const std::string accept_languages_;
+ const std::string app_locale_;
+ const std::string user_agent_;
const base::Time install_time_;
// Data that will be loaded asynchronously.
@@ -317,9 +320,6 @@
// instance is destroyed.
base::WeakPtrFactory<FingerprintDataLoader> weak_ptr_factory_;
- // The current application locale.
- std::string app_locale_;
-
// The callback that will be called once all the data is available.
base::Callback<void(scoped_ptr<Fingerprint>)> callback_;
@@ -336,6 +336,7 @@
const std::string& accept_languages,
const base::Time& install_time,
const std::string& app_locale,
+ const std::string& user_agent,
const base::TimeDelta& timeout,
const base::Callback<void(scoped_ptr<Fingerprint>)>& callback)
: gpu_data_manager_(content::GpuDataManager::GetInstance()),
@@ -347,6 +348,8 @@
version_(version),
charset_(charset),
accept_languages_(accept_languages),
+ app_locale_(app_locale),
+ user_agent_(user_agent),
install_time_(install_time),
waiting_on_plugins_(true),
weak_ptr_factory_(this),
@@ -445,7 +448,7 @@
machine->set_utc_offset_ms(GetTimezoneOffset().InMilliseconds());
machine->set_browser_language(app_locale_);
machine->set_charset(charset_);
- machine->set_user_agent(content::GetUserAgent(GURL()));
+ machine->set_user_agent(user_agent_);
machine->set_ram(base::SysInfo::AmountOfPhysicalMemory());
machine->set_browser_build(version_);
machine->set_browser_feature(
@@ -511,13 +514,15 @@
const std::string& accept_languages,
const base::Time& install_time,
const std::string& app_locale,
+ const std::string& user_agent,
const base::TimeDelta& timeout,
const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
// Begin loading all of the data that we need to load asynchronously.
// This class is responsible for freeing its own memory.
new FingerprintDataLoader(obfuscated_gaia_id, window_bounds, content_bounds,
screen_info, version, charset, accept_languages,
- install_time, app_locale, timeout, callback);
+ install_time, app_locale, user_agent, timeout,
+ callback);
}
} // namespace internal
@@ -531,6 +536,7 @@
const std::string& accept_languages,
const base::Time& install_time,
const std::string& app_locale,
+ const std::string& user_agent,
const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
gfx::Rect content_bounds;
web_contents.GetView()->GetContainerBounds(&content_bounds);
@@ -543,7 +549,7 @@
internal::GetFingerprintInternal(
obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version,
- charset, accept_languages, install_time, app_locale,
+ charset, accept_languages, install_time, app_locale, user_agent,
base::TimeDelta::FromSeconds(kTimeoutSeconds), callback);
}
« no previous file with comments | « components/autofill/content/browser/risk/fingerprint.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698