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

Side by Side Diff: Source/WebCore/page/Console.cpp

Issue 13861033: Remove Apple's unused implementation of private browsing from WebCore (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return; 83 return;
84 84
85 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1; 85 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
86 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize)); 86 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize));
87 const ScriptCallFrame& lastCaller = callStack->at(0); 87 const ScriptCallFrame& lastCaller = callStack->at(0);
88 88
89 String message; 89 String message;
90 bool gotMessage = arguments->getFirstArgumentAsString(message); 90 bool gotMessage = arguments->getFirstArgumentAsString(message);
91 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments); 91 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments);
92 92
93 if (page->settings()->privateBrowsingEnabled())
94 return;
95
96 if (gotMessage) 93 if (gotMessage)
97 page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, t ype, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 94 page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, t ype, level, message, lastCaller.lineNumber(), lastCaller.sourceURL());
98 } 95 }
99 96
100 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 97 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
101 { 98 {
102 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts); 99 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts);
103 } 100 }
104 101
105 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 102 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 248 }
252 249
253 Page* Console::page() const 250 Page* Console::page() const
254 { 251 {
255 if (!m_frame) 252 if (!m_frame)
256 return 0; 253 return 0;
257 return m_frame->page(); 254 return m_frame->page();
258 } 255 }
259 256
260 } // namespace WebCore 257 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698