diff --git a/brightray/browser/browser_client.cc b/brightray/browser/browser_client.cc index 8c39df65cc..e425b7a83b 100644 --- a/brightray/browser/browser_client.cc +++ b/brightray/browser/browser_client.cc @@ -23,7 +23,7 @@ namespace { BrowserClient* g_browser_client; -} +} // namespace BrowserClient* BrowserClient::Get() { return g_browser_client; diff --git a/brightray/browser/browser_main_parts.cc b/brightray/browser/browser_main_parts.cc index c37100a76e..93afed487f 100644 --- a/brightray/browser/browser_main_parts.cc +++ b/brightray/browser/browser_main_parts.cc @@ -54,8 +54,6 @@ #include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h" #endif -using content::BrowserThread; - namespace brightray { namespace { @@ -107,7 +105,7 @@ NOINLINE void WaitingForUIThreadToHandleIOError() { } int BrowserX11IOErrorHandler(Display* d) { - if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { + if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { // Wait for the UI thread (which has a different connection to the X server) // to get the error. We can't call shutdown from this thread without // tripping an error. Doing it through a function so that we'll be able diff --git a/brightray/browser/browser_main_parts_mac.mm b/brightray/browser/browser_main_parts_mac.mm index 19d0262a10..1df09f20e7 100644 --- a/brightray/browser/browser_main_parts_mac.mm +++ b/brightray/browser/browser_main_parts_mac.mm @@ -19,4 +19,4 @@ void BrowserMainParts::InitializeMainNib() { [mainNib release]; } -} +} // namespace brightray diff --git a/brightray/browser/devtools_file_system_indexer.cc b/brightray/browser/devtools_file_system_indexer.cc index 1700ff0eb9..e41830258f 100644 --- a/brightray/browser/devtools_file_system_indexer.cc +++ b/brightray/browser/devtools_file_system_indexer.cc @@ -205,7 +205,7 @@ vector Index::Search(string query) { vector result; FileIdsMap::const_iterator ids_it = file_ids_.begin(); for (; ids_it != file_ids_.end(); ++ids_it) { - if (trigrams.size() == 0 || + if (trigrams.empty() || file_ids.find(ids_it->second) != file_ids.end()) { result.push_back(ids_it->first); } diff --git a/brightray/browser/inspectable_web_contents_view_mac.mm b/brightray/browser/inspectable_web_contents_view_mac.mm index e708a68680..94edc1c1a7 100644 --- a/brightray/browser/inspectable_web_contents_view_mac.mm +++ b/brightray/browser/inspectable_web_contents_view_mac.mm @@ -56,4 +56,4 @@ void InspectableWebContentsViewMac::SetTitle(const base::string16& title) { [view_ setTitle:base::SysUTF16ToNSString(title)]; } -} +} // namespace brightray diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.mm b/brightray/browser/mac/bry_inspectable_web_contents_view.mm index 16174ed361..25e7083948 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.mm +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.mm @@ -8,8 +8,6 @@ #include "content/public/browser/render_widget_host_view.h" #include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h" -using namespace brightray; - @implementation BRYInspectableWebContentsView - (instancetype)initWithInspectableWebContentsViewMac:(InspectableWebContentsViewMac*)view { diff --git a/brightray/browser/net/devtools_network_controller.cc b/brightray/browser/net/devtools_network_controller.cc index cfa4e23471..07b469b1f7 100644 --- a/brightray/browser/net/devtools_network_controller.cc +++ b/brightray/browser/net/devtools_network_controller.cc @@ -67,7 +67,7 @@ DevToolsNetworkInterceptor* DevToolsNetworkController::GetInterceptor(const std::string& client_id) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (!interceptors_.size() || client_id.empty()) + if (interceptors_.empty() || client_id.empty()) return nullptr; DevToolsNetworkInterceptor* interceptor = interceptors_.get(client_id); diff --git a/brightray/browser/net/devtools_network_interceptor.cc b/brightray/browser/net/devtools_network_interceptor.cc index f0e3e0e488..73e8538310 100644 --- a/brightray/browser/net/devtools_network_interceptor.cc +++ b/brightray/browser/net/devtools_network_interceptor.cc @@ -108,7 +108,7 @@ uint64_t DevToolsNetworkInterceptor::UpdateThrottledRecords( uint64_t last_tick, base::TimeDelta tick_length) { if (tick_length.is_zero()) { - DCHECK(!records->size()); + DCHECK(records->empty()); return last_tick; } @@ -195,7 +195,7 @@ base::TimeTicks DevToolsNetworkInterceptor::CalculateDesiredTime( void DevToolsNetworkInterceptor::ArmTimer(base::TimeTicks now) { size_t suspend_count = suspended_.size(); - if (!download_.size() && !upload_.size() && !suspend_count) { + if (download_.empty() && upload_.empty() && !suspend_count) { timer_.Stop(); return; } diff --git a/brightray/browser/web_ui_controller_factory.cc b/brightray/browser/web_ui_controller_factory.cc index c59e5bb0c6..565c025888 100644 --- a/brightray/browser/web_ui_controller_factory.cc +++ b/brightray/browser/web_ui_controller_factory.cc @@ -16,7 +16,7 @@ namespace { const char kChromeUIDevToolsBundledHost[] = "devtools"; -} +} // namespace // static WebUIControllerFactory* WebUIControllerFactory::GetInstance() { diff --git a/brightray/common/application_info_mac.mm b/brightray/common/application_info_mac.mm index ee9f9bbf4c..6898b6376d 100644 --- a/brightray/common/application_info_mac.mm +++ b/brightray/common/application_info_mac.mm @@ -17,7 +17,7 @@ std::string ApplicationInfoDictionaryValue(CFStringRef key) { return ApplicationInfoDictionaryValue(base::mac::CFToNSCast(key)); } -} +} // namespace std::string GetApplicationName() { return ApplicationInfoDictionaryValue(kCFBundleNameKey); @@ -27,4 +27,4 @@ std::string GetApplicationVersion() { return ApplicationInfoDictionaryValue(@"CFBundleShortVersionString"); } -} +} // namespace brightray