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

Side by Side Diff: Source/core/inspector/InspectorInspectorAgent.cpp

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. 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 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (m_injectedScriptForOrigin.isEmpty()) 80 if (m_injectedScriptForOrigin.isEmpty())
81 return; 81 return;
82 82
83 String origin = frame->document()->securityOrigin()->toRawString(); 83 String origin = frame->document()->securityOrigin()->toRawString();
84 String script = m_injectedScriptForOrigin.get(origin); 84 String script = m_injectedScriptForOrigin.get(origin);
85 if (script.isEmpty()) 85 if (script.isEmpty())
86 return; 86 return;
87 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(ScriptSt ate::forMainWorld(frame)); 87 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(ScriptSt ate::forMainWorld(frame));
88 StringBuilder scriptSource; 88 StringBuilder scriptSource;
89 scriptSource.append(script); 89 scriptSource.append(script);
90 scriptSource.append("("); 90 scriptSource.append('(');
91 scriptSource.appendNumber(injectedScriptId); 91 scriptSource.appendNumber(injectedScriptId);
92 scriptSource.append(")"); 92 scriptSource.append(')');
93 frame->script().executeScriptInMainWorld(scriptSource.toString()); 93 frame->script().executeScriptInMainWorld(scriptSource.toString());
94 } 94 }
95 95
96 void InspectorInspectorAgent::init() 96 void InspectorInspectorAgent::init()
97 { 97 {
98 m_instrumentingAgents->setInspectorInspectorAgent(this); 98 m_instrumentingAgents->setInspectorInspectorAgent(this);
99 } 99 }
100 100
101 void InspectorInspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) 101 void InspectorInspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend)
102 { 102 {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 m_frontend->inspect(objectToInspect, hints); 163 m_frontend->inspect(objectToInspect, hints);
164 m_pendingInspectData.first = nullptr; 164 m_pendingInspectData.first = nullptr;
165 m_pendingInspectData.second = nullptr; 165 m_pendingInspectData.second = nullptr;
166 return; 166 return;
167 } 167 }
168 m_pendingInspectData.first = objectToInspect; 168 m_pendingInspectData.first = objectToInspect;
169 m_pendingInspectData.second = hints; 169 m_pendingInspectData.second = hints;
170 } 170 }
171 171
172 } // namespace blink 172 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorApplicationCacheAgent.cpp ('k') | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698