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

Unified Diff: ios/web_view/internal/web_view_web_client.mm

Issue 2791403005: Remove CWV class and move setting User Agent to CWVWebViewConfiguration. (Closed)
Patch Set: Move Browser State and Web Client ownership to CWVWebViewConfiguration. Each CWVWebViewConfiguratio… Created 3 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: ios/web_view/internal/web_view_web_client.mm
diff --git a/ios/web_view/internal/web_view_web_client.mm b/ios/web_view/internal/web_view_web_client.mm
index a9c60a05d0ff75b889784b9d4d94aec7c0e5086e..2fcd5660696b449c8b768401bc17fcb368eaae61 100644
--- a/ios/web_view/internal/web_view_web_client.mm
+++ b/ios/web_view/internal/web_view_web_client.mm
@@ -15,8 +15,7 @@
namespace ios_web_view {
-WebViewWebClient::WebViewWebClient(const std::string& user_agent_product)
- : user_agent_product_(user_agent_product), web_main_parts_(nullptr) {}
+WebViewWebClient::WebViewWebClient() : web_main_parts_(nullptr) {}
WebViewWebClient::~WebViewWebClient() = default;
@@ -25,14 +24,6 @@ web::WebMainParts* WebViewWebClient::CreateWebMainParts() {
return web_main_parts_;
}
-WebViewBrowserState* WebViewWebClient::browser_state() const {
- return web_main_parts_->browser_state();
-}
-
-WebViewBrowserState* WebViewWebClient::off_the_record_browser_state() const {
- return web_main_parts_->off_the_record_browser_state();
-}
-
std::string WebViewWebClient::GetProduct() const {
return user_agent_product_;
}
@@ -47,4 +38,8 @@ NSString* WebViewWebClient::GetEarlyPageScript(
.GetScript();
}
+void WebViewWebClient::SetProduct(const std::string& user_agent_product) {
+ user_agent_product_ = user_agent_product;
+}
+
} // namespace ios_web_view

Powered by Google App Engine
This is Rietveld 408576698