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

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

Issue 2259383002: Consistently use namespaced base::Version in extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 base::string16 extension_version; 158 base::string16 extension_version;
159 if (key.ReadValue(kRegistryExtensionVersion, &extension_version) 159 if (key.ReadValue(kRegistryExtensionVersion, &extension_version)
160 != ERROR_SUCCESS) { 160 != ERROR_SUCCESS) {
161 // TODO(erikkay): find a way to get this into about:extensions 161 // TODO(erikkay): find a way to get this into about:extensions
162 LOG(ERROR) << "Missing value " << kRegistryExtensionVersion 162 LOG(ERROR) << "Missing value " << kRegistryExtensionVersion
163 << " for key " << key_path << "."; 163 << " for key " << key_path << ".";
164 continue; 164 continue;
165 } 165 }
166 166
167 Version version(base::UTF16ToASCII(extension_version)); 167 base::Version version(base::UTF16ToASCII(extension_version));
168 if (!version.IsValid()) { 168 if (!version.IsValid()) {
169 LOG(ERROR) << "Invalid version value " << extension_version 169 LOG(ERROR) << "Invalid version value " << extension_version
170 << " for key " << key_path << "."; 170 << " for key " << key_path << ".";
171 continue; 171 continue;
172 } 172 }
173 173
174 prefs->SetString( 174 prefs->SetString(
175 MakePrefName(id, ExternalProviderImpl::kExternalVersion), 175 MakePrefName(id, ExternalProviderImpl::kExternalVersion),
176 base::UTF16ToASCII(extension_version)); 176 base::UTF16ToASCII(extension_version));
177 prefs->SetString( 177 prefs->SetString(
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 base::TimeTicks start_time = base::TimeTicks::Now(); 240 base::TimeTicks start_time = base::TimeTicks::Now();
241 std::unique_ptr<base::DictionaryValue> prefs = LoadPrefsOnFileThread(); 241 std::unique_ptr<base::DictionaryValue> prefs = LoadPrefsOnFileThread();
242 LOCAL_HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWinUpdate", 242 LOCAL_HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWinUpdate",
243 base::TimeTicks::Now() - start_time); 243 base::TimeTicks::Now() - start_time);
244 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 244 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
245 base::Bind(&ExternalRegistryLoader::OnUpdated, this, 245 base::Bind(&ExternalRegistryLoader::OnUpdated, this,
246 base::Passed(&prefs))); 246 base::Passed(&prefs)));
247 } 247 }
248 248
249 } // namespace extensions 249 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/pending_extension_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698