| OLD | NEW |
| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 for (int i = 0; it != end; ++it, i++) | 174 for (int i = 0; it != end; ++it, i++) |
| 175 resources->addItem(buildObjectForApplicationCacheResource(*it)); | 175 resources->addItem(buildObjectForApplicationCacheResource(*it)); |
| 176 | 176 |
| 177 return resources; | 177 return resources; |
| 178 } | 178 } |
| 179 | 179 |
| 180 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> InspectorApp
licationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCach
eHost::ResourceInfo& resourceInfo) | 180 PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> InspectorApp
licationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCach
eHost::ResourceInfo& resourceInfo) |
| 181 { | 181 { |
| 182 StringBuilder builder; | 182 StringBuilder builder; |
| 183 if (resourceInfo.m_isMaster) | 183 if (resourceInfo.m_isMaster) |
| 184 builder.append("Master "); | 184 builder.appendLiteral("Master "); |
| 185 | 185 |
| 186 if (resourceInfo.m_isManifest) | 186 if (resourceInfo.m_isManifest) |
| 187 builder.append("Manifest "); | 187 builder.appendLiteral("Manifest "); |
| 188 | 188 |
| 189 if (resourceInfo.m_isFallback) | 189 if (resourceInfo.m_isFallback) |
| 190 builder.append("Fallback "); | 190 builder.appendLiteral("Fallback "); |
| 191 | 191 |
| 192 if (resourceInfo.m_isForeign) | 192 if (resourceInfo.m_isForeign) |
| 193 builder.append("Foreign "); | 193 builder.appendLiteral("Foreign "); |
| 194 | 194 |
| 195 if (resourceInfo.m_isExplicit) | 195 if (resourceInfo.m_isExplicit) |
| 196 builder.append("Explicit "); | 196 builder.appendLiteral("Explicit "); |
| 197 | 197 |
| 198 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type
Builder::ApplicationCache::ApplicationCacheResource::create() | 198 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type
Builder::ApplicationCache::ApplicationCacheResource::create() |
| 199 .setUrl(resourceInfo.m_resource.string()) | 199 .setUrl(resourceInfo.m_resource.string()) |
| 200 .setSize(static_cast<int>(resourceInfo.m_size)) | 200 .setSize(static_cast<int>(resourceInfo.m_size)) |
| 201 .setType(builder.toString()); | 201 .setType(builder.toString()); |
| 202 return value; | 202 return value; |
| 203 } | 203 } |
| 204 | 204 |
| 205 void InspectorApplicationCacheAgent::trace(Visitor* visitor) | 205 void InspectorApplicationCacheAgent::trace(Visitor* visitor) |
| 206 { | 206 { |
| 207 visitor->trace(m_pageAgent); | 207 visitor->trace(m_pageAgent); |
| 208 InspectorBaseAgent::trace(visitor); | 208 InspectorBaseAgent::trace(visitor); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace blink | 211 } // namespace blink |
| 212 | 212 |
| OLD | NEW |