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

Unified Diff: chrome/browser/sessions/session_types.h

Issue 10170016: Add info about user agent overrides to WebContents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added SessionService saving Created 8 years, 8 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/sessions/session_types.h
diff --git a/chrome/browser/sessions/session_types.h b/chrome/browser/sessions/session_types.h
index e56ff3c73d2ca01a72c3ee5d5b014f876a60540d..f467bf66e42711788f1aca83224fbcac684d3759 100644
--- a/chrome/browser/sessions/session_types.h
+++ b/chrome/browser/sessions/session_types.h
@@ -95,6 +95,10 @@ class TabNavigation {
original_request_url_ = url;
}
+ // Whether or not we're overriding the standard user agent.
+ bool override_user_agent() const { return override_user_agent_; }
+ void set_override_user_agent(bool state) { override_user_agent_ = state; }
tony 2012/05/10 18:40:59 Nit: is_overriding_user_agent/set_is_overriding_us
gone 2012/05/11 15:40:30 Done.
+
// Converts a set of TabNavigations into a set of NavigationEntrys. The
// caller owns the NavigationEntrys.
static void CreateNavigationEntriesFromTabNavigations(
@@ -115,6 +119,7 @@ class TabNavigation {
int index_;
GURL original_request_url_;
+ bool override_user_agent_;
tony 2012/05/10 18:40:59 Nit: is_overriding_user_agent?
gone 2012/05/11 15:40:30 Done.
};
// SessionTab ----------------------------------------------------------------
@@ -156,6 +161,10 @@ struct SessionTab {
// If non-empty, this tab is an app tab and this is the id of the extension.
std::string extension_app_id;
+ // If non-empty, this string is used as the user agent whenever the tab's
+ // NavigationEntries need it overridden.
+ std::string user_agent_override;
+
// Timestamp for when this tab was last modified.
base::Time timestamp;

Powered by Google App Engine
This is Rietveld 408576698