Commit aa54295f authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Remove chrome_common_* namespaces.

It is just as easy to give the code within those namespaces unique
names. This is more consistent with the naming scheme elsewhere in
chrome/. e.g. ChromeAppsAPIProvider and ChromeContentClient.

Change-Id: I0f79aaf1bb00f61fb6599dfabb9ddf1f5ff4ad23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790276Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694501}
parent bc36f82c
...@@ -1629,9 +1629,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { ...@@ -1629,9 +1629,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
#endif // BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) #endif // BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS)
// Configure modules that need access to resources. // Configure modules that need access to resources.
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
media::SetLocalizedStringProvider( media::SetLocalizedStringProvider(ChromeMediaLocalizedStringProvider);
chrome_common_media::LocalizedStringProvider);
// In unittest mode, this will do nothing. In normal mode, this will create // In unittest mode, this will do nothing. In normal mode, this will create
// the global IntranetRedirectDetector instance, which will promptly go to // the global IntranetRedirectDetector instance, which will promptly go to
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
namespace chrome_common_media { namespace {
int MediaMessageIdToGrdId(media::MessageId message_id) { int MediaMessageIdToGrdId(media::MessageId message_id) {
switch (message_id) { switch (message_id) {
...@@ -24,8 +24,8 @@ int MediaMessageIdToGrdId(media::MessageId message_id) { ...@@ -24,8 +24,8 @@ int MediaMessageIdToGrdId(media::MessageId message_id) {
} }
} }
base::string16 LocalizedStringProvider(media::MessageId message_id) { } // namespace
base::string16 ChromeMediaLocalizedStringProvider(media::MessageId message_id) {
return l10n_util::GetStringUTF16(MediaMessageIdToGrdId(message_id)); return l10n_util::GetStringUTF16(MediaMessageIdToGrdId(message_id));
} }
} // namespace chrome_common_media
...@@ -8,11 +8,8 @@ ...@@ -8,11 +8,8 @@
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "media/base/localized_strings.h" #include "media/base/localized_strings.h"
namespace chrome_common_media {
// This is called indirectly by the media layer to access resources. // This is called indirectly by the media layer to access resources.
base::string16 LocalizedStringProvider(media::MessageId media_message_id); base::string16 ChromeMediaLocalizedStringProvider(
media::MessageId media_message_id);
} // namespace chrome_common_media
#endif // CHROME_COMMON_MEDIA_MEDIA_RESOURCE_PROVIDER_H_ #endif // CHROME_COMMON_MEDIA_MEDIA_RESOURCE_PROVIDER_H_
...@@ -55,9 +55,7 @@ struct LazyDirectoryListerCacher { ...@@ -55,9 +55,7 @@ struct LazyDirectoryListerCacher {
} // namespace } // namespace
namespace chrome_common_net { base::StringPiece ChromeNetResourceProvider(int key) {
base::StringPiece NetResourceProvider(int key) {
static base::NoDestructor<LazyDirectoryListerCacher> lazy_dir_lister; static base::NoDestructor<LazyDirectoryListerCacher> lazy_dir_lister;
if (IDR_DIR_HEADER_HTML == key) if (IDR_DIR_HEADER_HTML == key)
...@@ -65,5 +63,3 @@ base::StringPiece NetResourceProvider(int key) { ...@@ -65,5 +63,3 @@ base::StringPiece NetResourceProvider(int key) {
return ui::ResourceBundle::GetSharedInstance().GetRawDataResource(key); return ui::ResourceBundle::GetSharedInstance().GetRawDataResource(key);
} }
} // namespace chrome_common_net
...@@ -7,11 +7,7 @@ ...@@ -7,11 +7,7 @@
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
namespace chrome_common_net {
// This is called indirectly by the network layer to access resources. // This is called indirectly by the network layer to access resources.
base::StringPiece NetResourceProvider(int key); base::StringPiece ChromeNetResourceProvider(int key);
} // namespace chrome_common_net
#endif // CHROME_COMMON_NET_NET_RESOURCE_PROVIDER_H_ #endif // CHROME_COMMON_NET_NET_RESOURCE_PROVIDER_H_
...@@ -198,9 +198,8 @@ ChromeRenderThreadObserver::ChromeRenderThreadObserver() ...@@ -198,9 +198,8 @@ ChromeRenderThreadObserver::ChromeRenderThreadObserver()
thread->SetResourceDispatcherDelegate(resource_delegate_.get()); thread->SetResourceDispatcherDelegate(resource_delegate_.get());
// Configure modules that need access to resources. // Configure modules that need access to resources.
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
media::SetLocalizedStringProvider( media::SetLocalizedStringProvider(ChromeMediaLocalizedStringProvider);
chrome_common_media::LocalizedStringProvider);
// chrome-native: is a scheme used for placeholder navigations that allow // chrome-native: is a scheme used for placeholder navigations that allow
// UIs to be drawn with platform native widgets instead of HTML. These pages // UIs to be drawn with platform native widgets instead of HTML. These pages
......
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