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

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

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 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_extension_loader_win.h" 5 #include "chrome/browser/extensions/external_registry_extension_loader_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_handle.h" 10 #include "base/memory/scoped_handle.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 std::string id = WideToASCII(*it); 124 std::string id = WideToASCII(*it);
125 StringToLowerASCII(&id); 125 StringToLowerASCII(&id);
126 if (!extensions::Extension::IdIsValid(id)) { 126 if (!extensions::Extension::IdIsValid(id)) {
127 LOG(ERROR) << "Invalid id value " << id 127 LOG(ERROR) << "Invalid id value " << id
128 << " for key " << key_path << "."; 128 << " for key " << key_path << ".";
129 continue; 129 continue;
130 } 130 }
131 131
132 scoped_ptr<Version> version; 132 Version version(WideToASCII(extension_version));
133 version.reset(Version::GetVersionFromString( 133 if (!version.IsValid()) {
134 WideToASCII(extension_version)));
135 if (!version.get()) {
136 LOG(ERROR) << "Invalid version value " << extension_version 134 LOG(ERROR) << "Invalid version value " << extension_version
137 << " for key " << key_path << "."; 135 << " for key " << key_path << ".";
138 continue; 136 continue;
139 } 137 }
140 138
141 prefs->SetString( 139 prefs->SetString(
142 id + "." + ExternalExtensionProviderImpl::kExternalVersion, 140 id + "." + ExternalExtensionProviderImpl::kExternalVersion,
143 WideToASCII(extension_version)); 141 WideToASCII(extension_version));
144 prefs->SetString( 142 prefs->SetString(
145 id + "." + ExternalExtensionProviderImpl::kExternalCrx, 143 id + "." + ExternalExtensionProviderImpl::kExternalCrx,
146 extension_path_str); 144 extension_path_str);
147 } 145 }
148 146
149 prefs_.reset(prefs.release()); 147 prefs_.reset(prefs.release());
150 HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin", 148 HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin",
151 base::TimeTicks::Now() - start_time); 149 base::TimeTicks::Now() - start_time);
152 BrowserThread::PostTask( 150 BrowserThread::PostTask(
153 BrowserThread::UI, FROM_HERE, 151 BrowserThread::UI, FROM_HERE,
154 base::Bind(&ExternalRegistryExtensionLoader::LoadFinished, this)); 152 base::Bind(&ExternalRegistryExtensionLoader::LoadFinished, this));
155 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698