Fix cpplint warnings

This commit is contained in:
Cheng Zhao 2016-05-23 13:03:43 +09:00
parent 4b675a741d
commit 06800940ec
4 changed files with 12 additions and 7 deletions

View file

@ -134,7 +134,8 @@ content::ContentUtilityClient* AtomMainDelegate::CreateContentUtilityClient() {
return utility_client_.get(); return utility_client_.get();
} }
std::unique_ptr<brightray::ContentClient> AtomMainDelegate::CreateContentClient() { std::unique_ptr<brightray::ContentClient>
AtomMainDelegate::CreateContentClient() {
return std::unique_ptr<brightray::ContentClient>(new AtomContentClient); return std::unique_ptr<brightray::ContentClient>(new AtomContentClient);
} }

View file

@ -23,7 +23,8 @@ AtomURLRequestJobFactory::~AtomURLRequestJobFactory() {
} }
bool AtomURLRequestJobFactory::SetProtocolHandler( bool AtomURLRequestJobFactory::SetProtocolHandler(
const std::string& scheme, std::unique_ptr<ProtocolHandler> protocol_handler) { const std::string& scheme,
std::unique_ptr<ProtocolHandler> protocol_handler) {
if (!protocol_handler) { if (!protocol_handler) {
ProtocolHandlerMap::iterator it = protocol_handler_map_.find(scheme); ProtocolHandlerMap::iterator it = protocol_handler_map_.find(scheme);
if (it == protocol_handler_map_.end()) if (it == protocol_handler_map_.end())
@ -41,7 +42,8 @@ bool AtomURLRequestJobFactory::SetProtocolHandler(
} }
std::unique_ptr<ProtocolHandler> AtomURLRequestJobFactory::ReplaceProtocol( std::unique_ptr<ProtocolHandler> AtomURLRequestJobFactory::ReplaceProtocol(
const std::string& scheme, std::unique_ptr<ProtocolHandler> protocol_handler) { const std::string& scheme,
std::unique_ptr<ProtocolHandler> protocol_handler) {
if (!ContainsKey(protocol_handler_map_, scheme)) if (!ContainsKey(protocol_handler_map_, scheme))
return nullptr; return nullptr;
ProtocolHandler* original_protocol_handler = protocol_handler_map_[scheme]; ProtocolHandler* original_protocol_handler = protocol_handler_map_[scheme];

View file

@ -24,13 +24,14 @@ class AtomURLRequestJobFactory : public net::URLRequestJobFactory {
// Sets the ProtocolHandler for a scheme. Returns true on success, false on // Sets the ProtocolHandler for a scheme. Returns true on success, false on
// failure (a ProtocolHandler already exists for |scheme|). On success, // failure (a ProtocolHandler already exists for |scheme|). On success,
// URLRequestJobFactory takes ownership of |protocol_handler|. // URLRequestJobFactory takes ownership of |protocol_handler|.
bool SetProtocolHandler( bool SetProtocolHandler(const std::string& scheme,
const std::string& scheme, std::unique_ptr<ProtocolHandler> protocol_handler); std::unique_ptr<ProtocolHandler> protocol_handler);
// Intercepts the ProtocolHandler for a scheme. Returns the original protocol // Intercepts the ProtocolHandler for a scheme. Returns the original protocol
// handler on success, otherwise returns NULL. // handler on success, otherwise returns NULL.
std::unique_ptr<ProtocolHandler> ReplaceProtocol( std::unique_ptr<ProtocolHandler> ReplaceProtocol(
const std::string& scheme, std::unique_ptr<ProtocolHandler> protocol_handler); const std::string& scheme,
std::unique_ptr<ProtocolHandler> protocol_handler);
// Returns the protocol handler registered with scheme. // Returns the protocol handler registered with scheme.
ProtocolHandler* GetProtocolHandler(const std::string& scheme) const; ProtocolHandler* GetProtocolHandler(const std::string& scheme) const;

View file

@ -371,7 +371,8 @@ base::Value* V8ValueConverter::FromV8Object(
child_v8 = v8::Null(isolate); child_v8 = v8::Null(isolate);
} }
std::unique_ptr<base::Value> child(FromV8ValueImpl(state, child_v8, isolate)); std::unique_ptr<base::Value> child(
FromV8ValueImpl(state, child_v8, isolate));
if (!child.get()) if (!child.get())
// JSON.stringify skips properties whose values don't serialize, for // JSON.stringify skips properties whose values don't serialize, for
// example undefined and functions. Emulate that behavior. // example undefined and functions. Emulate that behavior.