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

Side by Side Diff: chrome/browser/extensions/external_registry_loader_win.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
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 "chrome/browser/extensions/external_registry_loader_win.h" 5 #include "chrome/browser/extensions/external_registry_loader_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_handle.h" 10 #include "base/memory/scoped_handle.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 base::FilePath extension_path(extension_path_str); 95 base::FilePath extension_path(extension_path_str);
96 if (!extension_path.IsAbsolute()) { 96 if (!extension_path.IsAbsolute()) {
97 LOG(ERROR) << "File path " << extension_path_str 97 LOG(ERROR) << "File path " << extension_path_str
98 << " needs to be absolute in key " 98 << " needs to be absolute in key "
99 << key_path; 99 << key_path;
100 continue; 100 continue;
101 } 101 }
102 102
103 if (!file_util::PathExists(extension_path)) { 103 if (!base::PathExists(extension_path)) {
104 LOG(ERROR) << "File " << extension_path_str 104 LOG(ERROR) << "File " << extension_path_str
105 << " for key " << key_path 105 << " for key " << key_path
106 << " does not exist or is not readable."; 106 << " does not exist or is not readable.";
107 continue; 107 continue;
108 } 108 }
109 109
110 if (!CanOpenFileForReading(extension_path)) { 110 if (!CanOpenFileForReading(extension_path)) {
111 LOG(ERROR) << "File " << extension_path_str 111 LOG(ERROR) << "File " << extension_path_str
112 << " for key " << key_path << " can not be read. " 112 << " for key " << key_path << " can not be read. "
113 << "Check that users who should have the extension " 113 << "Check that users who should have the extension "
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 prefs_.reset(prefs.release()); 150 prefs_.reset(prefs.release());
151 HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin", 151 HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin",
152 base::TimeTicks::Now() - start_time); 152 base::TimeTicks::Now() - start_time);
153 BrowserThread::PostTask( 153 BrowserThread::PostTask(
154 BrowserThread::UI, FROM_HERE, 154 BrowserThread::UI, FROM_HERE,
155 base::Bind(&ExternalRegistryLoader::LoadFinished, this)); 155 base::Bind(&ExternalRegistryLoader::LoadFinished, this));
156 } 156 }
157 157
158 } // namespace extensions 158 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_pref_loader.cc ('k') | chrome/browser/extensions/platform_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698