net: Add SetUploadStream method to URLFetcher.
[chromium-blink-merge.git] / ios / web / web_view_util.mm
blobd983306338807f8e8f30a289cae46167c2924516
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
3 // found in the LICENSE file.
5 #include "ios/web/web_view_util.h"
7 #include "base/ios/ios_util.h"
9 namespace {
11 // If true, UIWebView is always used even if WKWebView is available.
12 bool g_force_ui_web_view = false;
14 }  // namespace
16 namespace web {
18 bool IsWKWebViewEnabled() {
19 #if defined(ENABLE_WKWEBVIEW)
20   // Eventually this may be a dynamic flag, but for now it's purely a
21   // compile-time option.
22   return !g_force_ui_web_view && base::ios::IsRunningOnIOS8OrLater();
23 #else
24   return false;
25 #endif
28 void SetForceUIWebView(bool flag) {
29   g_force_ui_web_view = flag;
32 bool GetForceUIWebView() {
33   return g_force_ui_web_view;
36 }  // namespace web