Commit b1d0f5c9 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Remove using directives ("using namespace x") in content/.

It made sense to just remove the dwrite namespaces since these headers are
only included in the other dwrite files (and will only ever be), and standard
Chromium namespace usage is "just one namespace per top-level module" anyway.

Bug: 82078
Change-Id: I9f5808da274d649cbfc8fabdf94980caf1de6edd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815667Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698610}
parent 7db5fb15
...@@ -12,22 +12,20 @@ ...@@ -12,22 +12,20 @@
// Entry point for LibFuzzer. // Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
using namespace inspector_protocol_encoding;
if (size > 64 * 1024) { if (size > 64 * 1024) {
return 0; return 0;
} }
span<uint8_t> fuzz{data, size}; inspector_protocol_encoding::span<uint8_t> fuzz{data, size};
// We need to handle whatever the parser parses. So, we handle the parsed // We need to handle whatever the parser parses. So, we handle the parsed
// stuff with another CBOR encoder, just because it's conveniently available. // stuff with another CBOR encoder, just because it's conveniently available.
std::vector<uint8_t> encoded; std::vector<uint8_t> encoded;
Status status; inspector_protocol_encoding::Status status;
std::unique_ptr<StreamingParserHandler> encoder = std::unique_ptr<inspector_protocol_encoding::StreamingParserHandler> encoder =
cbor::NewCBOREncoder(&encoded, &status); inspector_protocol_encoding::cbor::NewCBOREncoder(&encoded, &status);
cbor::ParseCBOR(fuzz, encoder.get()); inspector_protocol_encoding::cbor::ParseCBOR(fuzz, encoder.get());
return 0; return 0;
} }
...@@ -419,7 +419,7 @@ TEST_P(NativeFileSystemFileWriterImplWriteTest, WriteWithOffsetPastFile) { ...@@ -419,7 +419,7 @@ TEST_P(NativeFileSystemFileWriterImplWriteTest, WriteWithOffsetPastFile) {
result = CloseSync(); result = CloseSync();
EXPECT_EQ(result, NativeFileSystemStatus::kOk); EXPECT_EQ(result, NativeFileSystemStatus::kOk);
using namespace std::string_literals; using std::string_literals::operator""s;
EXPECT_EQ("\0\0\0\0abc"s, ReadFile(test_file_url_)); EXPECT_EQ("\0\0\0\0abc"s, ReadFile(test_file_url_));
} }
......
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
namespace content { namespace content {
using namespace dwrite_font_uma_logging;
namespace dwrite_font_file_util {
bool FontFilePathAndTtcIndex(IDWriteFont* font, bool FontFilePathAndTtcIndex(IDWriteFont* font,
base::string16& file_path, base::string16& file_path,
uint32_t& ttc_index) { uint32_t& ttc_index) {
...@@ -178,5 +174,4 @@ base::string16 GetWindowsFontsPath() { ...@@ -178,5 +174,4 @@ base::string16 GetWindowsFontsPath() {
return base::i18n::FoldCase(font_path_chars.data()); return base::i18n::FoldCase(font_path_chars.data());
} }
} // namespace dwrite_font_file_util
} // namespace content } // namespace content
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
namespace content { namespace content {
namespace dwrite_font_file_util {
bool FontFilePathAndTtcIndex(IDWriteFontFace* font, bool FontFilePathAndTtcIndex(IDWriteFontFace* font,
base::string16& file_path, base::string16& file_path,
uint32_t& ttc_index); uint32_t& ttc_index);
...@@ -31,8 +29,6 @@ bool AddFilesForFont(IDWriteFont* font, ...@@ -31,8 +29,6 @@ bool AddFilesForFont(IDWriteFont* font,
base::string16 GetWindowsFontsPath(); base::string16 GetWindowsFontsPath();
} // namespace dwrite_font_file_util
} // namespace content } // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_DWRITE_FONT_FILE_UTIL_WIN_H_ #endif // CONTENT_BROWSER_RENDERER_HOST_DWRITE_FONT_FILE_UTIL_WIN_H_
...@@ -40,9 +40,6 @@ ...@@ -40,9 +40,6 @@
namespace content { namespace content {
using namespace dwrite_font_file_util;
using namespace dwrite_font_uma_logging;
namespace { namespace {
const base::FilePath::CharType kProtobufFilename[] = const base::FilePath::CharType kProtobufFilename[] =
......
...@@ -43,9 +43,6 @@ namespace mswr = Microsoft::WRL; ...@@ -43,9 +43,6 @@ namespace mswr = Microsoft::WRL;
namespace content { namespace content {
using namespace dwrite_font_uma_logging;
using namespace dwrite_font_file_util;
namespace { namespace {
// These are the fonts that Blink tries to load in getLastResortFallbackFont, // These are the fonts that Blink tries to load in getLastResortFallbackFont,
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
namespace content { namespace content {
namespace dwrite_font_uma_logging {
void LogLoaderType(DirectWriteFontLoaderType loader_type) { void LogLoaderType(DirectWriteFontLoaderType loader_type) {
UMA_HISTOGRAM_ENUMERATION("DirectWrite.Fonts.Proxy.LoaderType", loader_type); UMA_HISTOGRAM_ENUMERATION("DirectWrite.Fonts.Proxy.LoaderType", loader_type);
...@@ -29,5 +28,4 @@ void LogMessageFilterError(MessageFilterError error) { ...@@ -29,5 +28,4 @@ void LogMessageFilterError(MessageFilterError error) {
error); error);
} }
} // namespace dwrite_font_uma_logging
} // namespace content } // namespace content
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
namespace content { namespace content {
namespace dwrite_font_uma_logging {
// This enum is used to define the buckets for an enumerated UMA histogram. // This enum is used to define the buckets for an enumerated UMA histogram.
// Hence, // Hence,
// (a) existing enumerated constants should never be deleted or reordered, and // (a) existing enumerated constants should never be deleted or reordered, and
...@@ -53,7 +51,6 @@ void LogLastResortFontFileCount(size_t count); ...@@ -53,7 +51,6 @@ void LogLastResortFontFileCount(size_t count);
void LogMessageFilterError(MessageFilterError error); void LogMessageFilterError(MessageFilterError error);
} // namespace dwrite_font_uma_logging
} // namespace content } // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_DWRITE_FONT_UMA_LOGGING_WIN_H_ #endif // CONTENT_BROWSER_RENDERER_HOST_DWRITE_FONT_UMA_LOGGING_WIN_H_
...@@ -293,7 +293,7 @@ TEST_P(NavigationSimulatorTestCancelFail, Fail) { ...@@ -293,7 +293,7 @@ TEST_P(NavigationSimulatorTestCancelFail, Fail) {
TEST_P(NavigationSimulatorTestCancelFail, FailWithResponseHeaders) { TEST_P(NavigationSimulatorTestCancelFail, FailWithResponseHeaders) {
simulator_->Start(); simulator_->Start();
using namespace std::string_literals; using std::string_literals::operator""s;
std::string header = std::string header =
"HTTP/1.1 404 Not Found\0" "HTTP/1.1 404 Not Found\0"
"content-encoding: gzip\0\0"s; "content-encoding: gzip\0\0"s;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment