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

Unified Diff: ui/base/ui_base_paths.cc

Issue 537063002: Eliminate silently letting errors pass on pak loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one last time Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/ui_base_paths.cc
diff --git a/ui/base/ui_base_paths.cc b/ui/base/ui_base_paths.cc
index 083315d422833c6d7c59ef1d93fddc9ddb12f51e..4c39024fb282b266a2277193f6cc2cc2a3ec8c45 100644
--- a/ui/base/ui_base_paths.cc
+++ b/ui/base/ui_base_paths.cc
@@ -79,7 +79,11 @@ bool PathProvider(int key, base::FilePath* result) {
// This cannot be done as a static initializer sadly since Visual Studio will
// eliminate this object file if there is no direct entry point into it.
void RegisterPathProvider() {
- PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
+ static bool registered = false;
+ if (!registered) {
+ PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
+ registered = true;
+ }
}
} // namespace ui
« no previous file with comments | « ui/base/ui_base_paths.h ('k') | ui/base/ui_base_tests.gypi » ('j') | ui/base/ui_base_tests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698