diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 22:21:26 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 22:21:26 +0000 |
commit | 0a8d4275e94f160a53df92b8f9af2605b640c8f2 (patch) | |
tree | 09c723f7f266e85870319aea3073ee9679198ae8 | |
parent | 954bdb527e04da11fd31da6069231874a62954e9 (diff) | |
download | chromium_src-0a8d4275e94f160a53df92b8f9af2605b640c8f2.zip chromium_src-0a8d4275e94f160a53df92b8f9af2605b640c8f2.tar.gz chromium_src-0a8d4275e94f160a53df92b8f9af2605b640c8f2.tar.bz2 |
Cleanup: Fix some lint errors in content/.
Review URL: https://chromiumcodereview.appspot.com/11740038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175210 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed, 53 insertions, 47 deletions
diff --git a/content/browser/devtools/devtools_http_handler_impl.cc b/content/browser/devtools/devtools_http_handler_impl.cc index 2541ab6..40c3c21 100644 --- a/content/browser/devtools/devtools_http_handler_impl.cc +++ b/content/browser/devtools/devtools_http_handler_impl.cc @@ -827,8 +827,7 @@ void DevToolsHttpHandlerImpl::AcceptWebSocket( } DevToolsHttpHandlerImpl::PageInfo -DevToolsHttpHandlerImpl::CreatePageInfo(RenderViewHost* rvh) -{ +DevToolsHttpHandlerImpl::CreatePageInfo(RenderViewHost* rvh) { RenderViewHostDelegate* host_delegate = rvh->GetDelegate(); scoped_refptr<DevToolsAgentHost> agent(DevToolsAgentHost::GetFor(rvh)); DevToolsClientHost* client_host = DevToolsManager::GetInstance()-> diff --git a/content/browser/gamepad/gamepad_test_helpers.h b/content/browser/gamepad/gamepad_test_helpers.h index a31b147..d19b856 100644 --- a/content/browser/gamepad/gamepad_test_helpers.h +++ b/content/browser/gamepad/gamepad_test_helpers.h @@ -69,7 +69,7 @@ class GamepadTestHelper { // global singleton for the gamepad service. class GamepadServiceTestConstructor : public GamepadTestHelper { public: - GamepadServiceTestConstructor(const WebKit::WebGamepads& test_data); + explicit GamepadServiceTestConstructor(const WebKit::WebGamepads& test_data); virtual ~GamepadServiceTestConstructor(); GamepadService* gamepad_service() { return gamepad_service_; } diff --git a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc index f941f97..375b618 100644 --- a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc +++ b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc @@ -52,7 +52,8 @@ unsigned long long BrowserWebKitPlatformSupportImpl::visitedLinkHash( return 0; } -bool BrowserWebKitPlatformSupportImpl::isLinkVisited(unsigned long long link_hash) { +bool BrowserWebKitPlatformSupportImpl::isLinkVisited( + unsigned long long link_hash) { NOTREACHED(); return false; } diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc index a2fce40..237f69a 100644 --- a/content/browser/renderer_host/image_transport_factory.cc +++ b/content/browser/renderer_host/image_transport_factory.cc @@ -237,8 +237,8 @@ class CompositorSwapClient class BrowserCompositorOutputSurface; // Directs vsync updates to the appropriate BrowserCompositorOutputSurface. -class BrowserCompositorOutputSurfaceProxy : - public base::RefCountedThreadSafe<BrowserCompositorOutputSurfaceProxy> { +class BrowserCompositorOutputSurfaceProxy + : public base::RefCountedThreadSafe<BrowserCompositorOutputSurfaceProxy> { public: BrowserCompositorOutputSurfaceProxy() : message_handler_set_(false) { @@ -287,9 +287,9 @@ class BrowserCompositorOutputSurfaceProxy : // Adapts a WebGraphicsContext3DCommandBufferImpl into a // cc::OutputSurface that also handles vsync parameter updates // arriving from the GPU process. -class BrowserCompositorOutputSurface : - public cc::OutputSurface, - public base::NonThreadSafe { +class BrowserCompositorOutputSurface + : public cc::OutputSurface, + public base::NonThreadSafe { public: explicit BrowserCompositorOutputSurface( WebGraphicsContext3DCommandBufferImpl* context, @@ -365,10 +365,10 @@ void BrowserCompositorOutputSurfaceProxy::OnUpdateVSyncParameters( surface->OnUpdateVSyncParameters(timebase, interval); } -class GpuProcessTransportFactory : - public ui::ContextFactory, - public ImageTransportFactory, - public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { +class GpuProcessTransportFactory + : public ui::ContextFactory, + public ImageTransportFactory, + public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { public: GpuProcessTransportFactory() : ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { diff --git a/content/common/gamepad_hardware_buffer.h b/content/common/gamepad_hardware_buffer.h index 133b751..b3e8c2a 100644 --- a/content/common/gamepad_hardware_buffer.h +++ b/content/common/gamepad_hardware_buffer.h @@ -30,4 +30,4 @@ struct GamepadHardwareBuffer { } // namespace content -#endif // CONTENT_COMMON_GAMEPAD_HARDWARE_BUFFER_H_ +#endif // CONTENT_COMMON_GAMEPAD_HARDWARE_BUFFER_H_ diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc index d41c55a..a8e1290 100644 --- a/content/common/gpu/client/gl_helper.cc +++ b/content/common/gpu/client/gl_helper.cc @@ -208,7 +208,7 @@ class ScopedTextureBinder : ScopedBinder<target> { class ScopedFlush { public: - ScopedFlush(WebGraphicsContext3D* context) + explicit ScopedFlush(WebGraphicsContext3D* context) : context_(context) { } @@ -789,7 +789,6 @@ void GLHelper::InitCopyTextToImpl() { copy_texture_to_impl_.reset(new CopyTextureToImpl(context_, context_for_thread_, this)); - } void GLHelper::CopySubBufferDamage(WebKit::WebGLId texture, diff --git a/content/common/gpu/client/gl_helper.h b/content/common/gpu/client/gl_helper.h index 22f4662..0746afc 100644 --- a/content/common/gpu/client/gl_helper.h +++ b/content/common/gpu/client/gl_helper.h @@ -74,6 +74,7 @@ class GLHelper { WebKit::WebGLId previous_texture, const SkRegion& new_damage, const SkRegion& old_damage); + private: class CopyTextureToImpl; diff --git a/content/common/zygote_commands_linux.h b/content/common/zygote_commands_linux.h index 53b3dfd..6df1fda 100644 --- a/content/common/zygote_commands_linux.h +++ b/content/common/zygote_commands_linux.h @@ -35,7 +35,7 @@ enum { // Reap a renderer child. kZygoteCommandReap = 1, - // Check what happend to a child process. + // Check what happened to a child process. kZygoteCommandGetTerminationStatus = 2, // Read a bitmask of kSandboxLinux* diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc index 106a69f..e18ece4 100644 --- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc +++ b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc @@ -36,7 +36,8 @@ typedef struct CGFont* CGFontRef; namespace content { -class PpapiWebKitPlatformSupportImpl::SandboxSupport : public WebSandboxSupport { +class PpapiWebKitPlatformSupportImpl::SandboxSupport + : public WebSandboxSupport { public: virtual ~SandboxSupport() {} @@ -179,7 +180,8 @@ unsigned long long PpapiWebKitPlatformSupportImpl::visitedLinkHash( return 0; } -bool PpapiWebKitPlatformSupportImpl::isLinkVisited(unsigned long long link_hash) { +bool PpapiWebKitPlatformSupportImpl::isLinkVisited( + unsigned long long link_hash) { NOTREACHED(); return false; } @@ -204,7 +206,8 @@ WebKit::WebString PpapiWebKitPlatformSupportImpl::cookies( return WebKit::WebString(); } -void PpapiWebKitPlatformSupportImpl::prefetchHostName(const WebKit::WebString&) { +void PpapiWebKitPlatformSupportImpl::prefetchHostName( + const WebKit::WebString&) { NOTREACHED(); } diff --git a/content/public/common/window_container_type.cc b/content/public/common/window_container_type.cc index 8673b3a..0714f4e 100644 --- a/content/public/common/window_container_type.cc +++ b/content/public/common/window_container_type.cc @@ -14,7 +14,7 @@ namespace { const char kBackground[] = "background"; const char kPersistent[] = "persistent"; -} +} // namespace WindowContainerType WindowFeaturesToContainerType( const WebKit::WebWindowFeatures& window_features) { diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc index 2ccd54f..7f8c5b1 100644 --- a/content/public/test/render_view_test.cc +++ b/content/public/test/render_view_test.cc @@ -44,8 +44,8 @@ const int32 kSurfaceId = 42; namespace content { -class RendererWebKitPlatformSupportImplNoSandboxImpl : - public RendererWebKitPlatformSupportImpl { +class RendererWebKitPlatformSupportImplNoSandboxImpl + : public RendererWebKitPlatformSupportImpl { public: virtual WebKit::WebSandboxSupport* sandboxSupport() { return NULL; diff --git a/content/renderer/disambiguation_popup_helper.cc b/content/renderer/disambiguation_popup_helper.cc index 75bb913..fbdd2ae 100644 --- a/content/renderer/disambiguation_popup_helper.cc +++ b/content/renderer/disambiguation_popup_helper.cc @@ -32,7 +32,7 @@ const float kDisambiguationPopupMinScale = 2.0; float FindOptimalScaleFactor(const WebVector<WebRect>& target_rects) { using std::min; using std::max; - if (!target_rects.size()) // shall never reach + if (!target_rects.size()) // shall never reach return kDisambiguationPopupMinScale; int smallest_target = min(target_rects[0].width, target_rects[0].height); for (size_t i = 1; i < target_rects.size(); i++) { @@ -81,7 +81,7 @@ gfx::Rect CropZoomArea(const gfx::Rect& zoom_rect, top + bottom); } -} // unnamed namespace +} // namespace namespace content { @@ -103,4 +103,4 @@ float DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( return scale; } -} // namespace content +} // namespace content diff --git a/content/renderer/disambiguation_popup_helper.h b/content/renderer/disambiguation_popup_helper.h index 84ee049..e6bf97e 100644 --- a/content/renderer/disambiguation_popup_helper.h +++ b/content/renderer/disambiguation_popup_helper.h @@ -29,6 +29,6 @@ class DisambiguationPopupHelper { gfx::Rect* zoom_rect); }; -} // namespace content +} // namespace content -#endif // CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_ +#endif // CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_ diff --git a/content/renderer/disambiguation_popup_helper_unittest.cc b/content/renderer/disambiguation_popup_helper_unittest.cc index b3da46a..f7b1909 100644 --- a/content/renderer/disambiguation_popup_helper_unittest.cc +++ b/content/renderer/disambiguation_popup_helper_unittest.cc @@ -15,7 +15,7 @@ namespace { const float kDisambiguationPopupMaxScale = 5.0; const float kDisambiguationPopupMinScale = 2.0; -} // unnamed namespace +} // unnamed namespace namespace content { @@ -78,4 +78,4 @@ TEST_F(DisambiguationPopupHelperUnittest, LongLinks) { EXPECT_TRUE(gfx::Rect(kViewportSize_).Contains(gfx::Rect(scaled_size))); } -} // namespace content +} // namespace content diff --git a/content/renderer/favicon_helper.cc b/content/renderer/favicon_helper.cc index 5553047..770f2be 100644 --- a/content/renderer/favicon_helper.cc +++ b/content/renderer/favicon_helper.cc @@ -32,6 +32,7 @@ using webkit_glue::MultiResolutionImageResourceFetcher; namespace content { namespace { + bool TouchEnabled() { // Based on the definition of chrome::kEnableTouchIcon. #if defined(OS_ANDROID) @@ -41,7 +42,7 @@ bool TouchEnabled() { #endif } -} // namespace +} // namespace static FaviconURL::IconType ToFaviconType(WebIconURL::Type type) { @@ -189,4 +190,4 @@ void FaviconHelper::DidStopLoading() { SendUpdateFaviconURL(routing_id(), render_view()->GetPageId(), urls); } -} // namespace content +} // namespace content diff --git a/content/renderer/gamepad_shared_memory_reader.h b/content/renderer/gamepad_shared_memory_reader.h index a217c16..8375a24 100644 --- a/content/renderer/gamepad_shared_memory_reader.h +++ b/content/renderer/gamepad_shared_memory_reader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_GAMEPAD_UTIL_H_ -#define CONTENT_RENDERER_GAMEPAD_UTIL_H_ +#ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ +#define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ #include "base/shared_memory.h" #include "base/memory/scoped_ptr.h" @@ -29,4 +29,4 @@ class GamepadSharedMemoryReader { } // namespace content -#endif // CONTENT_RENDERER_GAMEPAD_UTIL_H_ +#endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index fee4cc7..c9df9fd 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc @@ -59,6 +59,7 @@ using WebKit::WebURLError; namespace content { namespace { + #if defined(USE_AURA) && defined(USE_X11) // Converts MockKeyboard::Modifiers to ui::EventFlags. int ConvertMockKeyboardModifier(MockKeyboard::Modifiers modifiers) { @@ -131,7 +132,7 @@ class WebUITestBrowserClient : public ShellContentBrowserClient { WebUITestWebUIControllerFactory factory_; }; -} +} // namespace class RenderViewImplTest : public RenderViewTest { public: @@ -153,7 +154,8 @@ class RenderViewImplTest : public RenderViewTest { // Retrieve the Unicode character for the given tuple (keyboard-layout, // key-code, and modifiers). // Exit when a keyboard-layout driver cannot assign a Unicode character to - // the tuple to prevent sending an invalid key code to the RenderView object. + // the tuple to prevent sending an invalid key code to the RenderView + // object. CHECK(mock_keyboard_.get()); CHECK(output); int length = mock_keyboard_->GetCharacters(layout, key_code, modifiers, @@ -1820,7 +1822,7 @@ TEST_F(RenderViewImplTest, SetEditableSelectionAndComposition) { ExecuteJavaScript("document.getElementById('test1').focus();"); view()->OnSetEditableSelectionOffsets(4, 8); const std::vector<WebKit::WebCompositionUnderline> empty_underline; - view()->OnSetCompositionFromExistingText(7,10, empty_underline); + view()->OnSetCompositionFromExistingText(7, 10, empty_underline); WebKit::WebTextInputInfo info = view()->webview()->textInputInfo(); EXPECT_EQ(4, info.selectionStart); EXPECT_EQ(8, info.selectionEnd); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index bbc86d1..37d1011 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -1915,8 +1915,9 @@ WebKit::WebCompositorOutputSurface* RenderViewImpl::createOutputSurface() { // 3d context. return new CompositorOutputSurface(routing_id(), NULL, new CompositorSoftwareOutputDeviceGLAdapter(context)); - } else + } else { return new CompositorOutputSurface(routing_id(), context, NULL); + } } void RenderViewImpl::didAddMessageToConsole( @@ -4269,7 +4270,7 @@ bool RenderViewImpl::willCheckAndDispatchMessageEvent( params.target_process_id = target_process_id_; params.target_routing_id = target_routing_id_; - std::map<int,int>::iterator it = active_frame_id_map_.find( + std::map<int, int>::iterator it = active_frame_id_map_.find( targetFrame->identifier()); if (it != active_frame_id_map_.end()) { params.target_frame_id = it->second; diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index e47ac5f..a1fe18d 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -363,7 +363,6 @@ RendererWebKitPlatformSupportImpl::MimeRegistry::mimeTypeForExtension( new MimeRegistryMsg_GetMimeTypeFromExtension( webkit_base::WebStringToFilePathString(file_extension), &mime_type)); return ASCIIToUTF16(mime_type); - } WebString RendererWebKitPlatformSupportImpl::MimeRegistry::mimeTypeFromFile( @@ -378,7 +377,6 @@ WebString RendererWebKitPlatformSupportImpl::MimeRegistry::mimeTypeFromFile( FilePath(webkit_base::WebStringToFilePathString(file_path)), &mime_type)); return ASCIIToUTF16(mime_type); - } WebString @@ -665,7 +663,7 @@ void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) { WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( const WebKit::WebURL& url) { - return WebKitPlatformSupportImpl::userAgent(url); + return WebKitPlatformSupportImpl::userAgent(url); } void RendererWebKitPlatformSupportImpl::GetPlugins( diff --git a/content/renderer/speech_recognition_dispatcher.cc b/content/renderer/speech_recognition_dispatcher.cc index 2304f5d..6a03488 100644 --- a/content/renderer/speech_recognition_dispatcher.cc +++ b/content/renderer/speech_recognition_dispatcher.cc @@ -149,9 +149,10 @@ void SpeechRecognitionDispatcher::OnErrorOccurred( recognizer_client_->didReceiveNoMatch(GetHandleFromID(request_id), WebSpeechRecognitionResult()); } else { - recognizer_client_->didReceiveError(GetHandleFromID(request_id), - WebString(), // TODO(primiano): message? - WebKitErrorCode(error.code)); + recognizer_client_->didReceiveError( + GetHandleFromID(request_id), + WebString(), // TODO(primiano): message? + WebKitErrorCode(error.code)); } } diff --git a/content/renderer/web_intents_host.cc b/content/renderer/web_intents_host.cc index 46aecfe..2e34e00 100644 --- a/content/renderer/web_intents_host.cc +++ b/content/renderer/web_intents_host.cc @@ -63,7 +63,7 @@ WebSerializedScriptValue GetReplyValue( } } -} // namespace +} // namespace class DeliveredIntentClientImpl : public WebDeliveredIntentClient { public: |