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

Side by Side Diff: ios/chrome/browser/web/chrome_web_client.mm

Issue 2949583002: [Payment Request] window.PaymentRequest must be undefined if PR is disabled (Closed)
Patch Set: Fixed build dependencies Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | ios/chrome/browser/web/chrome_web_client_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | ios/chrome/browser/web/chrome_web_client_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698