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

Side by Side Diff: app/resource_bundle.cc

Issue 6123006: Downgrade a CHECK to a LOG(ERROR) so we don't crash if we (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 "app/resource_bundle.h" 5 #include "app/resource_bundle.h"
6 6
7 #include "app/data_pack.h" 7 #include "app/data_pack.h"
8 #include "base/lock.h" 8 #include "base/lock.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 Load(); 241 Load();
242 } 242 }
243 243
244 ResourceBundle::LoadedDataPack::~LoadedDataPack() { 244 ResourceBundle::LoadedDataPack::~LoadedDataPack() {
245 } 245 }
246 246
247 void ResourceBundle::LoadedDataPack::Load() { 247 void ResourceBundle::LoadedDataPack::Load() {
248 DCHECK(!data_pack_.get()); 248 DCHECK(!data_pack_.get());
249 data_pack_.reset(new app::DataPack); 249 data_pack_.reset(new app::DataPack);
250 bool success = data_pack_->Load(path_); 250 bool success = data_pack_->Load(path_);
251 CHECK(success) << "Failed to load " << path_.value(); 251 LOG_IF(ERROR, !success) << "Failed to load " << path_.value()
252 << "\nYou will not be able to use the Bookmarks Manager or "
253 << "about:net-internals.";
252 } 254 }
253 255
254 bool ResourceBundle::LoadedDataPack::GetStringPiece( 256 bool ResourceBundle::LoadedDataPack::GetStringPiece(
255 int resource_id, base::StringPiece* data) const { 257 int resource_id, base::StringPiece* data) const {
256 return data_pack_->GetStringPiece(static_cast<uint32>(resource_id), data); 258 return data_pack_->GetStringPiece(static_cast<uint32>(resource_id), data);
257 } 259 }
258 260
259 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( 261 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory(
260 int resource_id) const { 262 int resource_id) const {
261 return data_pack_->GetStaticMemory(resource_id); 263 return data_pack_->GetStaticMemory(resource_id);
262 } 264 }
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