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

Side by Side Diff: chrome/browser/component_updater/default_component_installer.cc

Issue 23654010: Component Installer provides proper version to traits on registration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded the wrong fix, here we go. Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 crx.fingerprint = current_fingerprint_; 154 crx.fingerprint = current_fingerprint_;
155 installer_traits_->GetHash(&crx.pk_hash); 155 installer_traits_->GetHash(&crx.pk_hash);
156 ComponentUpdateService::Status status = cus->RegisterComponent(crx); 156 ComponentUpdateService::Status status = cus->RegisterComponent(crx);
157 if (status != ComponentUpdateService::kOk && 157 if (status != ComponentUpdateService::kOk &&
158 status != ComponentUpdateService::kReplaced) { 158 status != ComponentUpdateService::kReplaced) {
159 NOTREACHED() << "Component registration failed for " 159 NOTREACHED() << "Component registration failed for "
160 << installer_traits_->GetName(); 160 << installer_traits_->GetName();
161 return; 161 return;
162 } 162 }
163 163
164 base::Version installed_version; 164 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) {
165 if (current_version_.CompareTo(base::Version(kNullVersion)) <= 0) {
166 content::BrowserThread::PostTask( 165 content::BrowserThread::PostTask(
167 content::BrowserThread::FILE, FROM_HERE, 166 content::BrowserThread::FILE, FROM_HERE,
168 base::Bind(&ComponentInstallerTraits::ComponentReady, 167 base::Bind(&ComponentInstallerTraits::ComponentReady,
169 base::Unretained(installer_traits_.get()), 168 base::Unretained(installer_traits_.get()),
170 installed_version, 169 current_version_,
171 GetInstallDirectory())); 170 GetInstallDirectory()));
172 } 171 }
173 } 172 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698