Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ios/chrome/browser/web/chrome_web_client.h" | 5 #include "ios/chrome/browser/web/chrome_web_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 additional_schemes->push_back(dom_distiller::kDomDistillerScheme); | 156 additional_schemes->push_back(dom_distiller::kDomDistillerScheme); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void ChromeWebClient::PostBrowserURLRewriterCreation( | 159 void ChromeWebClient::PostBrowserURLRewriterCreation( |
| 160 web::BrowserURLRewriter* rewriter) { | 160 web::BrowserURLRewriter* rewriter) { |
| 161 rewriter->AddURLRewriter(&WillHandleWebBrowserAboutURL); | 161 rewriter->AddURLRewriter(&WillHandleWebBrowserAboutURL); |
| 162 } | 162 } |
| 163 | 163 |
| 164 NSString* ChromeWebClient::GetEarlyPageScript( | 164 NSString* ChromeWebClient::GetEarlyPageScript( |
| 165 web::BrowserState* browser_state) const { | 165 web::BrowserState* browser_state) const { |
| 166 return GetPageScript(@"chrome_bundle"); | 166 NSString* chromePageScript = GetPageScript(@"chrome_bundle"); |
|
Eugene But (OOO till 7-30)
2017/06/19 14:53:58
s/chromePageScript/chrome_page_script
Moe
2017/06/19 15:11:10
done.
| |
| 167 | |
| 168 if (!experimental_flags::IsPaymentRequestEnabled()) | |
| 169 return chromePageScript; | |
| 170 | |
| 171 NSString* kScriptTemplate = @"%@; %@"; | |
| 172 return [NSString stringWithFormat:kScriptTemplate, | |
| 173 GetPageScript(@"payment_request"), | |
| 174 chromePageScript]; | |
| 167 } | 175 } |
| 168 | 176 |
| 169 void ChromeWebClient::AllowCertificateError( | 177 void ChromeWebClient::AllowCertificateError( |
| 170 web::WebState* web_state, | 178 web::WebState* web_state, |
| 171 int cert_error, | 179 int cert_error, |
| 172 const net::SSLInfo& info, | 180 const net::SSLInfo& info, |
| 173 const GURL& request_url, | 181 const GURL& request_url, |
| 174 bool overridable, | 182 bool overridable, |
| 175 const base::Callback<void(bool)>& callback) { | 183 const base::Callback<void(bool)>& callback) { |
| 176 IOSSSLErrorHandler::HandleSSLError(web_state, cert_error, info, request_url, | 184 IOSSSLErrorHandler::HandleSSLError(web_state, cert_error, info, request_url, |
| 177 overridable, callback); | 185 overridable, callback); |
| 178 } | 186 } |
| 179 | 187 |
| 180 std::unique_ptr<base::TaskScheduler::InitParams> | 188 std::unique_ptr<base::TaskScheduler::InitParams> |
| 181 ChromeWebClient::GetTaskSchedulerInitParams() { | 189 ChromeWebClient::GetTaskSchedulerInitParams() { |
| 182 return task_scheduler_util::GetBrowserTaskSchedulerInitParamsFromVariations(); | 190 return task_scheduler_util::GetBrowserTaskSchedulerInitParamsFromVariations(); |
| 183 } | 191 } |
| 184 | 192 |
| 185 void ChromeWebClient::PerformExperimentalTaskSchedulerRedirections() { | 193 void ChromeWebClient::PerformExperimentalTaskSchedulerRedirections() { |
| 186 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); | 194 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); |
| 187 } | 195 } |
| OLD | NEW |