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

Side by Side Diff: webkit/support/platform_support_mac.mm

Issue 7714036: [Mac] Return an empty StringPiece from GetDataResource() when g_resource_data_pack is NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/support/platform_support.h" 5 #include "webkit/support/platform_support.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #import <objc/objc-runtime.h> 9 #import <objc/objc-runtime.h>
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 path = path.AppendASCII("textAreaResizeCorner.png"); 204 path = path.AppendASCII("textAreaResizeCorner.png");
205 bool success = file_util::ReadFileToString(path, &resize_corner_data); 205 bool success = file_util::ReadFileToString(path, &resize_corner_data);
206 if (!success) { 206 if (!success) {
207 LOG(FATAL) << "Failed reading: " << path.value(); 207 LOG(FATAL) << "Failed reading: " << path.value();
208 } 208 }
209 } 209 }
210 return resize_corner_data; 210 return resize_corner_data;
211 } 211 }
212 } 212 }
213 base::StringPiece res; 213 base::StringPiece res;
214 g_resource_data_pack->GetStringPiece(resource_id, &res); 214 if (g_resource_data_pack)
215 g_resource_data_pack->GetStringPiece(resource_id, &res);
215 return res; 216 return res;
216 } 217 }
217 218
218 } // namespace webkit_glue 219 } // namespace webkit_glue
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