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

Side by Side Diff: components/component_updater/default_component_installer.cc

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/component_updater/default_component_installer.h" 5 #include "components/component_updater/default_component_installer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 main_task_runner_->PostTask( 111 main_task_runner_->PostTask(
112 FROM_HERE, 112 FROM_HERE,
113 base::Bind(&DefaultComponentInstaller::ComponentReady, 113 base::Bind(&DefaultComponentInstaller::ComponentReady,
114 this, base::Passed(&manifest_copy))); 114 this, base::Passed(&manifest_copy)));
115 return true; 115 return true;
116 } 116 }
117 117
118 bool DefaultComponentInstaller::GetInstalledFile( 118 bool DefaultComponentInstaller::GetInstalledFile(
119 const std::string& file, 119 const std::string& file,
120 base::FilePath* installed_file) { 120 base::FilePath* installed_file) {
121 if (current_version_.Equals(base::Version(kNullVersion))) 121 if (current_version_ == base::Version(kNullVersion)) {
brettw 2016/01/08 19:31:16 Don't add {}
Rob Percival 2016/01/09 23:54:03 Done.
122 return false; // No component has been installed yet. 122 return false; // No component has been installed yet.
123 }
123 124
124 *installed_file = installer_traits_->GetBaseDirectory() 125 *installed_file = installer_traits_->GetBaseDirectory()
125 .AppendASCII(current_version_.GetString()) 126 .AppendASCII(current_version_.GetString())
126 .AppendASCII(file); 127 .AppendASCII(file);
127 return true; 128 return true;
128 } 129 }
129 130
130 bool DefaultComponentInstaller::Uninstall() { 131 bool DefaultComponentInstaller::Uninstall() {
131 DCHECK(thread_checker_.CalledOnValidThread()); 132 DCHECK(thread_checker_.CalledOnValidThread());
132 task_runner_->PostTask( 133 task_runner_->PostTask(
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ComponentReady(std::move(manifest_copy)); 269 ComponentReady(std::move(manifest_copy));
269 } 270 }
270 271
271 void DefaultComponentInstaller::ComponentReady( 272 void DefaultComponentInstaller::ComponentReady(
272 scoped_ptr<base::DictionaryValue> manifest) { 273 scoped_ptr<base::DictionaryValue> manifest) {
273 installer_traits_->ComponentReady(current_version_, GetInstallDirectory(), 274 installer_traits_->ComponentReady(current_version_, GetInstallDirectory(),
274 std::move(manifest)); 275 std::move(manifest));
275 } 276 }
276 277
277 } // namespace component_updater 278 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698