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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorApplicationCacheAgent.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 for (int i = 0; it != end; ++it, i++) 167 for (int i = 0; it != end; ++it, i++)
168 resources->addItem(buildObjectForApplicationCacheResource(*it)); 168 resources->addItem(buildObjectForApplicationCacheResource(*it));
169 169
170 return resources; 170 return resources;
171 } 171 }
172 172
173 std::unique_ptr<protocol::ApplicationCache::ApplicationCacheResource> InspectorA pplicationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCa cheHost::ResourceInfo& resourceInfo) 173 std::unique_ptr<protocol::ApplicationCache::ApplicationCacheResource> InspectorA pplicationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCa cheHost::ResourceInfo& resourceInfo)
174 { 174 {
175 StringBuilder builder; 175 StringBuilder builder;
176 if (resourceInfo.m_isMaster) 176 if (resourceInfo.m_isMaster)
177 builder.appendLiteral("Master "); 177 builder.append("Master ");
178 178
179 if (resourceInfo.m_isManifest) 179 if (resourceInfo.m_isManifest)
180 builder.appendLiteral("Manifest "); 180 builder.append("Manifest ");
181 181
182 if (resourceInfo.m_isFallback) 182 if (resourceInfo.m_isFallback)
183 builder.appendLiteral("Fallback "); 183 builder.append("Fallback ");
184 184
185 if (resourceInfo.m_isForeign) 185 if (resourceInfo.m_isForeign)
186 builder.appendLiteral("Foreign "); 186 builder.append("Foreign ");
187 187
188 if (resourceInfo.m_isExplicit) 188 if (resourceInfo.m_isExplicit)
189 builder.appendLiteral("Explicit "); 189 builder.append("Explicit ");
190 190
191 std::unique_ptr<protocol::ApplicationCache::ApplicationCacheResource> value = protocol::ApplicationCache::ApplicationCacheResource::create() 191 std::unique_ptr<protocol::ApplicationCache::ApplicationCacheResource> value = protocol::ApplicationCache::ApplicationCacheResource::create()
192 .setUrl(resourceInfo.m_resource.getString()) 192 .setUrl(resourceInfo.m_resource.getString())
193 .setSize(static_cast<int>(resourceInfo.m_size)) 193 .setSize(static_cast<int>(resourceInfo.m_size))
194 .setType(builder.toString()).build(); 194 .setType(builder.toString()).build();
195 return value; 195 return value;
196 } 196 }
197 197
198 DEFINE_TRACE(InspectorApplicationCacheAgent) 198 DEFINE_TRACE(InspectorApplicationCacheAgent)
199 { 199 {
200 visitor->trace(m_inspectedFrames); 200 visitor->trace(m_inspectedFrames);
201 InspectorBaseAgent::trace(visitor); 201 InspectorBaseAgent::trace(visitor);
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698