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

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: Fixes mistake in previous 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))
122 return false; // No component has been installed yet. 122 return false; // No component has been installed yet.
123 123
124 *installed_file = installer_traits_->GetBaseDirectory() 124 *installed_file = installer_traits_->GetBaseDirectory()
125 .AppendASCII(current_version_.GetString()) 125 .AppendASCII(current_version_.GetString())
126 .AppendASCII(file); 126 .AppendASCII(file);
127 return true; 127 return true;
128 } 128 }
129 129
130 bool DefaultComponentInstaller::Uninstall() { 130 bool DefaultComponentInstaller::Uninstall() {
131 DCHECK(thread_checker_.CalledOnValidThread()); 131 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ComponentReady(std::move(manifest_copy)); 268 ComponentReady(std::move(manifest_copy));
269 } 269 }
270 270
271 void DefaultComponentInstaller::ComponentReady( 271 void DefaultComponentInstaller::ComponentReady(
272 scoped_ptr<base::DictionaryValue> manifest) { 272 scoped_ptr<base::DictionaryValue> manifest) {
273 installer_traits_->ComponentReady(current_version_, GetInstallDirectory(), 273 installer_traits_->ComponentReady(current_version_, GetInstallDirectory(),
274 std::move(manifest)); 274 std::move(manifest));
275 } 275 }
276 276
277 } // namespace component_updater 277 } // namespace component_updater
OLDNEW
« no previous file with comments | « chrome/renderer/media/chrome_key_systems.cc ('k') | components/update_client/update_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698