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

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

Issue 109673004: Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the hea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 base::string16 extension_version; 140 base::string16 extension_version;
141 if (key.ReadValue(kRegistryExtensionVersion, &extension_version) 141 if (key.ReadValue(kRegistryExtensionVersion, &extension_version)
142 != ERROR_SUCCESS) { 142 != ERROR_SUCCESS) {
143 // TODO(erikkay): find a way to get this into about:extensions 143 // TODO(erikkay): find a way to get this into about:extensions
144 LOG(ERROR) << "Missing value " << kRegistryExtensionVersion 144 LOG(ERROR) << "Missing value " << kRegistryExtensionVersion
145 << " for key " << key_path << "."; 145 << " for key " << key_path << ".";
146 continue; 146 continue;
147 } 147 }
148 148
149 base::Version version(WideToASCII(extension_version)); 149 Version version(WideToASCII(extension_version));
150 if (!version.IsValid()) { 150 if (!version.IsValid()) {
151 LOG(ERROR) << "Invalid version value " << extension_version 151 LOG(ERROR) << "Invalid version value " << extension_version
152 << " for key " << key_path << "."; 152 << " for key " << key_path << ".";
153 continue; 153 continue;
154 } 154 }
155 155
156 prefs->SetString( 156 prefs->SetString(
157 id + "." + ExternalProviderImpl::kExternalVersion, 157 id + "." + ExternalProviderImpl::kExternalVersion,
158 WideToASCII(extension_version)); 158 WideToASCII(extension_version));
159 prefs->SetString( 159 prefs->SetString(
160 id + "." + ExternalProviderImpl::kExternalCrx, 160 id + "." + ExternalProviderImpl::kExternalCrx,
161 extension_path_str); 161 extension_path_str);
162 } 162 }
163 163
164 prefs_.reset(prefs.release()); 164 prefs_.reset(prefs.release());
165 HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin", 165 HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin",
166 base::TimeTicks::Now() - start_time); 166 base::TimeTicks::Now() - start_time);
167 BrowserThread::PostTask( 167 BrowserThread::PostTask(
168 BrowserThread::UI, FROM_HERE, 168 BrowserThread::UI, FROM_HERE,
169 base::Bind(&ExternalRegistryLoader::LoadFinished, this)); 169 base::Bind(&ExternalRegistryLoader::LoadFinished, this));
170 } 170 }
171 171
172 } // namespace extensions 172 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/updater/extension_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698