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

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

Issue 321473003: Elevated install of recovery component (component update part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 content::BrowserThread::UI, 92 content::BrowserThread::UI,
93 FROM_HERE, 93 FROM_HERE,
94 base::Bind(&ComponentInstallerTraits::ComponentReady, 94 base::Bind(&ComponentInstallerTraits::ComponentReady,
95 base::Unretained(installer_traits_.get()), 95 base::Unretained(installer_traits_.get()),
96 current_version_, 96 current_version_,
97 GetInstallDirectory(), 97 GetInstallDirectory(),
98 base::Passed(&manifest_copy))); 98 base::Passed(&manifest_copy)));
99 return true; 99 return true;
100 } 100 }
101 101
102 base::FilePath DefaultComponentInstaller::GetBackupPath() const {
103 return base::FilePath();
104 }
105
106 void DefaultComponentInstaller::InstallExternally() {
107 }
108
102 bool DefaultComponentInstaller::GetInstalledFile( 109 bool DefaultComponentInstaller::GetInstalledFile(
103 const std::string& file, 110 const std::string& file,
104 base::FilePath* installed_file) { 111 base::FilePath* installed_file) {
105 if (current_version_.Equals(base::Version(kNullVersion))) 112 if (current_version_.Equals(base::Version(kNullVersion)))
106 return false; // No component has been installed yet. 113 return false; // No component has been installed yet.
107 114
108 *installed_file = installer_traits_->GetBaseDirectory() 115 *installed_file = installer_traits_->GetBaseDirectory()
109 .AppendASCII(current_version_.GetString()) 116 .AppendASCII(current_version_.GetString())
110 .AppendASCII(file); 117 .AppendASCII(file);
111 return true; 118 return true;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 217
211 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) { 218 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) {
212 scoped_ptr<base::DictionaryValue> manifest_copy( 219 scoped_ptr<base::DictionaryValue> manifest_copy(
213 current_manifest_->DeepCopy()); 220 current_manifest_->DeepCopy());
214 installer_traits_->ComponentReady( 221 installer_traits_->ComponentReady(
215 current_version_, GetInstallDirectory(), manifest_copy.Pass()); 222 current_version_, GetInstallDirectory(), manifest_copy.Pass());
216 } 223 }
217 } 224 }
218 225
219 } // namespace component_updater 226 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698