Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1203)

Side by Side Diff: chrome/renderer/extensions/logging_native_handler.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/extensions/logging_native_handler.h" 5 #include "chrome/renderer/extensions/logging_native_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 25 matching lines...) Expand all
36 void LoggingNativeHandler::Dcheck( 36 void LoggingNativeHandler::Dcheck(
37 const v8::FunctionCallbackInfo<v8::Value>& args) { 37 const v8::FunctionCallbackInfo<v8::Value>& args) {
38 bool check_value; 38 bool check_value;
39 std::string error_message; 39 std::string error_message;
40 ParseArgs(args, &check_value, &error_message); 40 ParseArgs(args, &check_value, &error_message);
41 DCHECK(check_value) << error_message; 41 DCHECK(check_value) << error_message;
42 } 42 }
43 43
44 void LoggingNativeHandler::DcheckIsOn( 44 void LoggingNativeHandler::DcheckIsOn(
45 const v8::FunctionCallbackInfo<v8::Value>& args) { 45 const v8::FunctionCallbackInfo<v8::Value>& args) {
46 args.GetReturnValue().Set(DCHECK_IS_ON()); 46 args.GetReturnValue().Set(DCHECK_IS_ON);
47 } 47 }
48 48
49 void LoggingNativeHandler::Log( 49 void LoggingNativeHandler::Log(
50 const v8::FunctionCallbackInfo<v8::Value>& args) { 50 const v8::FunctionCallbackInfo<v8::Value>& args) {
51 CHECK_EQ(1, args.Length()); 51 CHECK_EQ(1, args.Length());
52 LOG(INFO) << *v8::String::Utf8Value(args[0]); 52 LOG(INFO) << *v8::String::Utf8Value(args[0]);
53 } 53 }
54 54
55 void LoggingNativeHandler::Warning( 55 void LoggingNativeHandler::Warning(
56 const v8::FunctionCallbackInfo<v8::Value>& args) { 56 const v8::FunctionCallbackInfo<v8::Value>& args) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 std::string LoggingNativeHandler::ToStringOrDefault( 89 std::string LoggingNativeHandler::ToStringOrDefault(
90 const v8::Handle<v8::String>& v8_string, 90 const v8::Handle<v8::String>& v8_string,
91 const std::string& dflt) { 91 const std::string& dflt) {
92 if (v8_string.IsEmpty()) 92 if (v8_string.IsEmpty())
93 return dflt; 93 return dflt;
94 std::string ascii_value = *v8::String::Utf8Value(v8_string); 94 std::string ascii_value = *v8::String::Utf8Value(v8_string);
95 return ascii_value.empty() ? dflt : ascii_value; 95 return ascii_value.empty() ? dflt : ascii_value;
96 } 96 }
97 97
98 } // namespace extensions 98 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/logging_native_handler.h ('k') | content/common/gpu/media/gpu_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698