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

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

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 "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/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/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (key.Open(HKEY_LOCAL_MACHINE, 91 if (key.Open(HKEY_LOCAL_MACHINE,
92 key_path.c_str(), 92 key_path.c_str(),
93 KEY_READ | KEY_WOW64_32KEY) != ERROR_SUCCESS && 93 KEY_READ | KEY_WOW64_32KEY) != ERROR_SUCCESS &&
94 key.Open(HKEY_CURRENT_USER, key_path.c_str(), KEY_READ) != 94 key.Open(HKEY_CURRENT_USER, key_path.c_str(), KEY_READ) !=
95 ERROR_SUCCESS) { 95 ERROR_SUCCESS) {
96 LOG(ERROR) << "Unable to read registry key at path (HKLM & HKCU): " 96 LOG(ERROR) << "Unable to read registry key at path (HKLM & HKCU): "
97 << key_path << "."; 97 << key_path << ".";
98 continue; 98 continue;
99 } 99 }
100 100
101 std::string id = base::UTF16ToASCII(*it); 101 std::string id = base::ToLowerASCII(base::UTF16ToASCII(*it));
102 base::StringToLowerASCII(&id);
103 if (!crx_file::id_util::IdIsValid(id)) { 102 if (!crx_file::id_util::IdIsValid(id)) {
104 LOG(ERROR) << "Invalid id value " << id 103 LOG(ERROR) << "Invalid id value " << id
105 << " for key " << key_path << "."; 104 << " for key " << key_path << ".";
106 continue; 105 continue;
107 } 106 }
108 107
109 base::string16 extension_dist_id; 108 base::string16 extension_dist_id;
110 if (key.ReadValue(kRegistryExtensionInstallParam, &extension_dist_id) == 109 if (key.ReadValue(kRegistryExtensionInstallParam, &extension_dist_id) ==
111 ERROR_SUCCESS) { 110 ERROR_SUCCESS) {
112 prefs->SetString(MakePrefName(id, ExternalProviderImpl::kInstallParam), 111 prefs->SetString(MakePrefName(id, ExternalProviderImpl::kInstallParam),
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 184
186 prefs_.reset(prefs.release()); 185 prefs_.reset(prefs.release());
187 LOCAL_HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin", 186 LOCAL_HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin",
188 base::TimeTicks::Now() - start_time); 187 base::TimeTicks::Now() - start_time);
189 BrowserThread::PostTask( 188 BrowserThread::PostTask(
190 BrowserThread::UI, FROM_HERE, 189 BrowserThread::UI, FROM_HERE,
191 base::Bind(&ExternalRegistryLoader::LoadFinished, this)); 190 base::Bind(&ExternalRegistryLoader::LoadFinished, this));
192 } 191 }
193 192
194 } // namespace extensions 193 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/updater/local_extension_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698