mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
build: Remove icu
This commit is contained in:
parent
1db45d14c9
commit
3297690905
@ -2211,8 +2211,10 @@ component("net") {
|
||||
# Use ICU alternative on iOS.
|
||||
sources += [ "base/net_string_util_icu_alternatives_ios.mm" ]
|
||||
} else {
|
||||
assert(false,
|
||||
"ICU alternative is not implemented for platform: " + target_os)
|
||||
sources += [
|
||||
"base/filename_util_icu_dummy.cc",
|
||||
"base/net_string_util_icu_alternatives_dummy.cc",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
# Use ICU.
|
||||
|
45
net/base/filename_util_icu_dummy.cc
Normal file
45
net/base/filename_util_icu_dummy.cc
Normal file
@ -0,0 +1,45 @@
|
||||
// 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/logging.h"
|
||||
#include "base/strings/string16.h"
|
||||
|
||||
class GURL;
|
||||
|
||||
namespace net {
|
||||
|
||||
bool IsSafePortablePathComponent(const base::FilePath& component) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsSafePortableRelativePath(const base::FilePath& path) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
base::string16 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::string16();
|
||||
}
|
||||
|
||||
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 base::FilePath();
|
||||
}
|
||||
|
||||
} // namespace net
|
43
net/base/net_string_util_icu_alternatives_dummy.cc
Normal file
43
net/base/net_string_util_icu_alternatives_dummy.cc
Normal file
@ -0,0 +1,43 @@
|
||||
// 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/net_string_util.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
const char* const kCharsetLatin1 = "";
|
||||
|
||||
bool ConvertToUtf8(const std::string& text, const char* charset,
|
||||
std::string* output) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ConvertToUtf8AndNormalize(const std::string& text, const char* charset,
|
||||
std::string* output) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ConvertToUTF16(const std::string& text, const char* charset,
|
||||
base::string16* output) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ConvertToUTF16WithSubstitutions(const std::string& text,
|
||||
const char* charset,
|
||||
base::string16* output) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ToUpper(const base::string16& str, base::string16* output) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace net
|
@ -87,8 +87,7 @@ component("url") {
|
||||
} else if (is_ios) {
|
||||
sources += [ "url_canon_icu_alternatives_ios.mm" ]
|
||||
} else {
|
||||
assert(false,
|
||||
"ICU alternative is not implemented for platform: " + target_os)
|
||||
sources += [ "url_canon_icu_alternatives_dummy.cc" ]
|
||||
}
|
||||
} else {
|
||||
# Use ICU.
|
||||
|
15
url/url_canon_icu_alternatives_dummy.cc
Normal file
15
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/logging.h"
|
||||
#include "url/url_canon.h"
|
||||
|
||||
namespace url {
|
||||
|
||||
bool IDNToASCII(const base::char16* src, int src_len, CanonOutputW* output) {
|
||||
NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace url
|
Loading…
Reference in New Issue
Block a user