From 06800940eca919b440e76c11b3db2db1ac43627b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 23 May 2016 13:03:43 +0900 Subject: [PATCH] Fix cpplint warnings --- atom/app/atom_main_delegate.cc | 3 ++- atom/browser/net/atom_url_request_job_factory.cc | 6 ++++-- atom/browser/net/atom_url_request_job_factory.h | 7 ++++--- atom/common/native_mate_converters/v8_value_converter.cc | 3 ++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 82337dc5f6a6..ff7ba0894f35 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -134,7 +134,8 @@ content::ContentUtilityClient* AtomMainDelegate::CreateContentUtilityClient() { return utility_client_.get(); } -std::unique_ptr AtomMainDelegate::CreateContentClient() { +std::unique_ptr +AtomMainDelegate::CreateContentClient() { return std::unique_ptr(new AtomContentClient); } diff --git a/atom/browser/net/atom_url_request_job_factory.cc b/atom/browser/net/atom_url_request_job_factory.cc index 3bf332d0fb33..aff2565814b5 100644 --- a/atom/browser/net/atom_url_request_job_factory.cc +++ b/atom/browser/net/atom_url_request_job_factory.cc @@ -23,7 +23,8 @@ AtomURLRequestJobFactory::~AtomURLRequestJobFactory() { } bool AtomURLRequestJobFactory::SetProtocolHandler( - const std::string& scheme, std::unique_ptr protocol_handler) { + const std::string& scheme, + std::unique_ptr protocol_handler) { if (!protocol_handler) { ProtocolHandlerMap::iterator it = protocol_handler_map_.find(scheme); if (it == protocol_handler_map_.end()) @@ -41,7 +42,8 @@ bool AtomURLRequestJobFactory::SetProtocolHandler( } std::unique_ptr AtomURLRequestJobFactory::ReplaceProtocol( - const std::string& scheme, std::unique_ptr protocol_handler) { + const std::string& scheme, + std::unique_ptr protocol_handler) { if (!ContainsKey(protocol_handler_map_, scheme)) return nullptr; ProtocolHandler* original_protocol_handler = protocol_handler_map_[scheme]; diff --git a/atom/browser/net/atom_url_request_job_factory.h b/atom/browser/net/atom_url_request_job_factory.h index ba7a4796f9a5..e3dbd7754240 100644 --- a/atom/browser/net/atom_url_request_job_factory.h +++ b/atom/browser/net/atom_url_request_job_factory.h @@ -24,13 +24,14 @@ class AtomURLRequestJobFactory : public net::URLRequestJobFactory { // Sets the ProtocolHandler for a scheme. Returns true on success, false on // failure (a ProtocolHandler already exists for |scheme|). On success, // URLRequestJobFactory takes ownership of |protocol_handler|. - bool SetProtocolHandler( - const std::string& scheme, std::unique_ptr protocol_handler); + bool SetProtocolHandler(const std::string& scheme, + std::unique_ptr protocol_handler); // Intercepts the ProtocolHandler for a scheme. Returns the original protocol // handler on success, otherwise returns NULL. std::unique_ptr ReplaceProtocol( - const std::string& scheme, std::unique_ptr protocol_handler); + const std::string& scheme, + std::unique_ptr protocol_handler); // Returns the protocol handler registered with scheme. ProtocolHandler* GetProtocolHandler(const std::string& scheme) const; diff --git a/atom/common/native_mate_converters/v8_value_converter.cc b/atom/common/native_mate_converters/v8_value_converter.cc index 13df524c34e5..ff96b727e02a 100644 --- a/atom/common/native_mate_converters/v8_value_converter.cc +++ b/atom/common/native_mate_converters/v8_value_converter.cc @@ -371,7 +371,8 @@ base::Value* V8ValueConverter::FromV8Object( child_v8 = v8::Null(isolate); } - std::unique_ptr child(FromV8ValueImpl(state, child_v8, isolate)); + std::unique_ptr child( + FromV8ValueImpl(state, child_v8, isolate)); if (!child.get()) // JSON.stringify skips properties whose values don't serialize, for // example undefined and functions. Emulate that behavior.