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

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: Forgot to initialize bool in constructor; win_rel caught it Created 8 years, 7 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/sessions/session_service_unittest.cc ('k') | chrome/browser/sessions/session_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_types.h
diff --git a/chrome/browser/sessions/session_types.h b/chrome/browser/sessions/session_types.h
index 11b4abb2307c03d747d20df3a499e860e02cddf6..2ed7486abce423285c3096ccaba29b1e09f05b96 100644
--- a/chrome/browser/sessions/session_types.h
+++ b/chrome/browser/sessions/session_types.h
@@ -95,6 +95,12 @@ class TabNavigation {
original_request_url_ = url;
}
+ // Whether or not we're overriding the standard user agent.
+ bool is_overriding_user_agent() const { return is_overriding_user_agent_; }
+ void set_is_overriding_user_agent(bool state) {
+ is_overriding_user_agent_ = state;
+ }
+
// Converts a set of TabNavigations into a set of NavigationEntrys. The
// caller owns the NavigationEntrys.
static void CreateNavigationEntriesFromTabNavigations(
@@ -115,6 +121,7 @@ class TabNavigation {
int index_;
GURL original_request_url_;
+ bool is_overriding_user_agent_;
};
// SessionTab ----------------------------------------------------------------
@@ -156,6 +163,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;
« no previous file with comments | « chrome/browser/sessions/session_service_unittest.cc ('k') | chrome/browser/sessions/session_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698