[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / url / url_idna_icu_alternatives_ios.mm
index 0fb241b..c36a618 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -6,8 +6,8 @@
 
 #include <ostream>
 #include <string>
+#include <string_view>
 
-#include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "url/url_canon_internal.h"
@@ -16,9 +16,9 @@ namespace url {
 
 // Only allow ASCII to avoid ICU dependency. Use NSString+IDN
 // to convert non-ASCII URL prior to passing to API.
-bool IDNToASCII(const char16_t* src, int src_len, CanonOutputW* output) {
-  if (base::IsStringASCII(base::StringPiece16(src, src_len))) {
-    output->Append(src, src_len);
+bool IDNToASCII(std::u16string_view src, CanonOutputW* output) {
+  if (base::IsStringASCII(src)) {
+    output->Append(src);
     return true;
   }
   DCHECK(false) << "IDN URL support is not available.";