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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/base/ui_base_paths.h" 5 #include "ui/base/ui_base_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 !base::CreateDirectory(cur)) 72 !base::CreateDirectory(cur))
73 return false; 73 return false;
74 74
75 *result = cur; 75 *result = cur;
76 return true; 76 return true;
77 } 77 }
78 78
79 // This cannot be done as a static initializer sadly since Visual Studio will 79 // This cannot be done as a static initializer sadly since Visual Studio will
80 // eliminate this object file if there is no direct entry point into it. 80 // eliminate this object file if there is no direct entry point into it.
81 void RegisterPathProvider() { 81 void RegisterPathProvider() {
82 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 82 static bool registered = false;
83 if (!registered) {
84 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
85 registered = true;
86 }
83 } 87 }
84 88
85 } // namespace ui 89 } // namespace ui
OLDNEW
« 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