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

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

Issue 105823009: Revert 239280 "Move more file_util functions to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 15 matching lines...) Expand all
26 // The Registry subkey that contains information about external extensions. 26 // The Registry subkey that contains information about external extensions.
27 const char kRegistryExtensions[] = "Software\\Google\\Chrome\\Extensions"; 27 const char kRegistryExtensions[] = "Software\\Google\\Chrome\\Extensions";
28 28
29 // Registry value of of that key that defines the path to the .crx file. 29 // Registry value of of that key that defines the path to the .crx file.
30 const wchar_t kRegistryExtensionPath[] = L"path"; 30 const wchar_t kRegistryExtensionPath[] = L"path";
31 31
32 // Registry value of that key that defines the current version of the .crx file. 32 // Registry value of that key that defines the current version of the .crx file.
33 const wchar_t kRegistryExtensionVersion[] = L"version"; 33 const wchar_t kRegistryExtensionVersion[] = L"version";
34 34
35 bool CanOpenFileForReading(const base::FilePath& path) { 35 bool CanOpenFileForReading(const base::FilePath& path) {
36 ScopedStdioHandle file_handle(base::OpenFile(path, "rb")); 36 ScopedStdioHandle file_handle(file_util::OpenFile(path, "rb"));
37 return file_handle.get() != NULL; 37 return file_handle.get() != NULL;
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 namespace extensions { 42 namespace extensions {
43 43
44 void ExternalRegistryLoader::StartLoading() { 44 void ExternalRegistryLoader::StartLoading() {
45 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 45 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
46 BrowserThread::PostTask( 46 BrowserThread::PostTask(
(...skipping 102 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 | « trunk/src/chrome/browser/extensions/extension_creator.cc ('k') | trunk/src/chrome/browser/extensions/sandboxed_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698