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

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

Issue 14142009: 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
« no previous file with comments | « Source/WebCore/loader/icon/IconDatabaseBase.h ('k') | Source/WebCore/page/Page.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) 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return; 81 return;
82 82
83 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1; 83 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
84 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize)); 84 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize));
85 const ScriptCallFrame& lastCaller = callStack->at(0); 85 const ScriptCallFrame& lastCaller = callStack->at(0);
86 86
87 String message; 87 String message;
88 bool gotMessage = arguments->getFirstArgumentAsString(message); 88 bool gotMessage = arguments->getFirstArgumentAsString(message);
89 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments); 89 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments);
90 90
91 if (page->settings()->privateBrowsingEnabled())
92 return;
93
94 if (gotMessage) 91 if (gotMessage)
95 page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, t ype, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 92 page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, t ype, level, message, lastCaller.lineNumber(), lastCaller.sourceURL());
96 } 93 }
97 94
98 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 95 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
99 { 96 {
100 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts); 97 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts);
101 } 98 }
102 99
103 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 100 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 242 }
246 243
247 Page* Console::page() const 244 Page* Console::page() const
248 { 245 {
249 if (!m_frame) 246 if (!m_frame)
250 return 0; 247 return 0;
251 return m_frame->page(); 248 return m_frame->page();
252 } 249 }
253 250
254 } // namespace WebCore 251 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/icon/IconDatabaseBase.h ('k') | Source/WebCore/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698