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

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 427803002: DevTools: nits: introduce a handy asBool(bool*) and use across agents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorInputAgent.cpp ('k') | Source/core/inspector/InspectorRuntimeAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index 1f63779e44b8b524bb16c2c5ed5bc53288d02b72..eb3a7dc6e39b64af6dde48a2d4e08a11001c43f9 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -544,7 +544,7 @@ void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCa
{
m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : "";
m_pendingScriptPreprocessor = optionalScriptPreprocessor ? *optionalScriptPreprocessor : "";
- m_page->deprecatedLocalMainFrame()->loader().reload(optionalIgnoreCache && *optionalIgnoreCache ? EndToEndReload : NormalReload);
+ m_page->deprecatedLocalMainFrame()->loader().reload(asBool(optionalIgnoreCache) ? EndToEndReload : NormalReload);
}
void InspectorPageAgent::navigate(ErrorString*, const String& url, String* outFrameId)
@@ -739,9 +739,6 @@ void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, c
{
results = TypeBuilder::Array<TypeBuilder::Page::SearchMatch>::create();
- bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
- bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
-
LocalFrame* frame = frameForId(frameId);
KURL kurl(ParsedURLString, url);
@@ -759,7 +756,7 @@ void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, c
if (!success)
return;
- results = ContentSearchUtils::searchInTextByLines(content, query, caseSensitive, isRegex);
+ results = ContentSearchUtils::searchInTextByLines(content, query, asBool(optionalCaseSensitive), asBool(optionalIsRegex));
}
void InspectorPageAgent::setDocumentContent(ErrorString* errorString, const String& frameId, const String& html)
@@ -1405,7 +1402,7 @@ bool InspectorPageAgent::compositingEnabled(ErrorString* errorString)
void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, const bool* showGrid)
{
m_state->setBoolean(PageAgentState::showSizeOnResize, show);
- m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid);
+ m_state->setBoolean(PageAgentState::showGridOnResize, asBool(showGrid));
}
void InspectorPageAgent::clearEditedResourcesContent()
« no previous file with comments | « Source/core/inspector/InspectorInputAgent.cpp ('k') | Source/core/inspector/InspectorRuntimeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698