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

Side by Side Diff: mojo/services/html_viewer/blink_platform_impl.cc

Issue 1007913002: Add logging for missing resource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/html_viewer/blink_platform_impl.h" 5 #include "mojo/services/html_viewer/blink_platform_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 blink::WebData BlinkPlatformImpl::loadResource(const char* resource) { 152 blink::WebData BlinkPlatformImpl::loadResource(const char* resource) {
153 for (size_t i = 0; i < arraysize(kDataResources); ++i) { 153 for (size_t i = 0; i < arraysize(kDataResources); ++i) {
154 if (!strcmp(resource, kDataResources[i].name)) { 154 if (!strcmp(resource, kDataResources[i].name)) {
155 int length; 155 int length;
156 const char* data = 156 const char* data =
157 blink_resource_map_.GetResource(kDataResources[i].id, &length); 157 blink_resource_map_.GetResource(kDataResources[i].id, &length);
158 CHECK(data != nullptr && length > 0); 158 CHECK(data != nullptr && length > 0);
159 return blink::WebData(data, length); 159 return blink::WebData(data, length);
160 } 160 }
161 } 161 }
162 NOTREACHED() << "Requested resource is unavailable!"; 162 NOTREACHED() << "Requested resource is unavailable: " << resource;
163 return blink::WebData(); 163 return blink::WebData();
164 } 164 }
165 165
166 blink::WebURLLoader* BlinkPlatformImpl::createURLLoader() { 166 blink::WebURLLoader* BlinkPlatformImpl::createURLLoader() {
167 return NULL; 167 return NULL;
168 } 168 }
169 169
170 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() { 170 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() {
171 return NULL; 171 return NULL;
172 } 172 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 // static 242 // static
243 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { 243 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) {
244 WebThreadImplForMessageLoop* impl = 244 WebThreadImplForMessageLoop* impl =
245 static_cast<WebThreadImplForMessageLoop*>(thread); 245 static_cast<WebThreadImplForMessageLoop*>(thread);
246 delete impl; 246 delete impl;
247 } 247 }
248 248
249 } // namespace html_viewer 249 } // namespace html_viewer
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698