mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-21 21:06:12 +03:00
net, url: Remove icu
This commit is contained in:
parent
9f69e7b26c
commit
e2102e663d
@ -1654,13 +1654,18 @@ component("net") {
|
|||||||
if (use_platform_icu_alternatives) {
|
if (use_platform_icu_alternatives) {
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
# Use ICU alternative on Android.
|
# Use ICU alternative on Android.
|
||||||
sources += [ "base/net_string_util_icu_alternatives_android.cc" ]
|
sources += [
|
||||||
|
"base/filename_util_icu_dummy.cc",
|
||||||
|
"base/net_string_util_icu_alternatives_dummy.cc",
|
||||||
|
]
|
||||||
} else if (is_ios) {
|
} else if (is_ios) {
|
||||||
# Use ICU alternative on iOS.
|
# Use ICU alternative on iOS.
|
||||||
sources += [ "base/net_string_util_icu_alternatives_ios.mm" ]
|
sources += [ "base/net_string_util_icu_alternatives_ios.mm" ]
|
||||||
} else {
|
} else {
|
||||||
assert(false,
|
sources += [
|
||||||
"ICU alternative is not implemented for platform: " + target_os)
|
"base/filename_util_icu_dummy.cc",
|
||||||
|
"base/net_string_util_icu_alternatives_dummy.cc",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# Use ICU.
|
# Use ICU.
|
||||||
|
44
src/net/base/filename_util_icu_dummy.cc
Normal file
44
src/net/base/filename_util_icu_dummy.cc
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
#include "net/base/filename_util.h"
|
||||||
|
|
||||||
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/notreached.h"
|
||||||
|
|
||||||
|
class GURL;
|
||||||
|
|
||||||
|
namespace net {
|
||||||
|
|
||||||
|
bool IsSafePortablePathComponent(const base::FilePath& component) {
|
||||||
|
NOTIMPLEMENTED();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsSafePortableRelativePath(const base::FilePath& path) {
|
||||||
|
NOTIMPLEMENTED();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::u16string GetSuggestedFilename(const GURL& url,
|
||||||
|
const std::string& content_disposition,
|
||||||
|
const std::string& referrer_charset,
|
||||||
|
const std::string& suggested_name,
|
||||||
|
const std::string& mime_type,
|
||||||
|
const std::string& default_name) {
|
||||||
|
NOTIMPLEMENTED();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
base::FilePath GenerateFileName(const GURL& url,
|
||||||
|
const std::string& content_disposition,
|
||||||
|
const std::string& referrer_charset,
|
||||||
|
const std::string& suggested_name,
|
||||||
|
const std::string& mime_type,
|
||||||
|
const std::string& default_file_name) {
|
||||||
|
NOTIMPLEMENTED();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace net
|
37
src/net/base/net_string_util_icu_alternatives_dummy.cc
Normal file
37
src/net/base/net_string_util_icu_alternatives_dummy.cc
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
|
#include "net/base/net_string_util.h"
|
||||||
|
|
||||||
|
namespace net {
|
||||||
|
|
||||||
|
const char* const kCharsetLatin1 = "";
|
||||||
|
|
||||||
|
bool ConvertToUtf8(std::string_view text, const char* charset,
|
||||||
|
std::string* output) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ConvertToUtf8AndNormalize(std::string_view text, const char* charset,
|
||||||
|
std::string* output) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ConvertToUTF16(std::string_view text, const char* charset,
|
||||||
|
std::u16string* output) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ConvertToUTF16WithSubstitutions(std::string_view text,
|
||||||
|
const char* charset,
|
||||||
|
std::u16string* output) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ToUpperUsingLocale(std::u16string_view str, std::u16string* output) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} // namespace net
|
@ -95,13 +95,11 @@ component("url") {
|
|||||||
# ICU support.
|
# ICU support.
|
||||||
if (use_platform_icu_alternatives) {
|
if (use_platform_icu_alternatives) {
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
sources += [ "url_idna_icu_alternatives_android.cc" ]
|
sources += [ "url_canon_icu_alternatives_dummy.cc" ]
|
||||||
deps += [ ":buildflags" ]
|
|
||||||
} else if (is_ios) {
|
} else if (is_ios) {
|
||||||
sources += [ "url_idna_icu_alternatives_ios.mm" ]
|
sources += [ "url_idna_icu_alternatives_ios.mm" ]
|
||||||
} else {
|
} else {
|
||||||
assert(false,
|
sources += [ "url_canon_icu_alternatives_dummy.cc" ]
|
||||||
"ICU alternative is not implemented for platform: " + target_os)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# Use ICU.
|
# Use ICU.
|
||||||
|
15
src/url/url_canon_icu_alternatives_dummy.cc
Normal file
15
src/url/url_canon_icu_alternatives_dummy.cc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2013 The Chromium Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
#include "base/notreached.h"
|
||||||
|
#include "url/url_canon.h"
|
||||||
|
|
||||||
|
namespace url {
|
||||||
|
|
||||||
|
bool IDNToASCII(std::u16string_view src, CanonOutputW* output) {
|
||||||
|
NOTIMPLEMENTED();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace url
|
Loading…
Reference in New Issue
Block a user