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

Side by Side Diff: third_party/WebKit/Source/wtf/Assertions.cpp

Issue 2741343017: Move files in wtf/ to platform/wtf/ (Part 4). (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.h ('k') | third_party/WebKit/Source/wtf/Atomics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007-2009 Torch Mobile, Inc. 3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
4 * Copyright (C) 2011 University of Szeged. All rights reserved. 4 * Copyright (C) 2011 University of Szeged. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (current() == this) { 180 if (current() == this) {
181 if (m_multiline) 181 if (m_multiline)
182 indent(); 182 indent();
183 else 183 else
184 print(" "); 184 print(" ");
185 print(")\n"); 185 print(")\n");
186 current() = m_parent; 186 current() = m_parent;
187 } 187 }
188 } 188 }
189 189
190 void ScopedLogger::setPrintFuncForTests(PrintFunctionPtr ptr) {
191 m_printFunc = ptr;
192 };
193
190 void ScopedLogger::init(const char* format, va_list args) { 194 void ScopedLogger::init(const char* format, va_list args) {
191 current() = this; 195 current() = this;
192 if (m_parent) 196 if (m_parent)
193 m_parent->writeNewlineIfNeeded(); 197 m_parent->writeNewlineIfNeeded();
194 indent(); 198 indent();
195 print("( "); 199 print("( ");
196 m_printFunc(format, args); 200 m_printFunc(format, args);
197 } 201 }
198 202
199 void ScopedLogger::writeNewlineIfNeeded() { 203 void ScopedLogger::writeNewlineIfNeeded() {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 252
249 } // namespace WTF 253 } // namespace WTF
250 #endif // !LOG_DISABLED 254 #endif // !LOG_DISABLED
251 255
252 void WTFLogAlways(const char* format, ...) { 256 void WTFLogAlways(const char* format, ...) {
253 va_list args; 257 va_list args;
254 va_start(args, format); 258 va_start(args, format);
255 vprintf_stderr_with_trailing_newline(format, args); 259 vprintf_stderr_with_trailing_newline(format, args);
256 va_end(args); 260 va_end(args);
257 } 261 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.h ('k') | third_party/WebKit/Source/wtf/Atomics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698