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

Side by Side Diff: chrome/browser/component_updater/test/test_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 "chrome/browser/component_updater/test/test_installer.h" 5 #include "chrome/browser/component_updater/test/test_installer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 12
13 namespace component_updater { 13 namespace component_updater {
14 14
15 TestInstaller::TestInstaller() : error_(0), install_count_(0) { 15 TestInstaller::TestInstaller() : error_(0), install_count_(0) {
16 } 16 }
17 17
18 void TestInstaller::OnUpdateError(int error) { 18 void TestInstaller::OnUpdateError(int error) {
19 error_ = error; 19 error_ = error;
20 } 20 }
21 21
22 bool TestInstaller::Install(const base::DictionaryValue& manifest, 22 bool TestInstaller::Install(const base::DictionaryValue& manifest,
23 const base::FilePath& unpack_path) { 23 const base::FilePath& unpack_path) {
24 ++install_count_; 24 ++install_count_;
25 return base::DeleteFile(unpack_path, true); 25 return base::DeleteFile(unpack_path, true);
26 } 26 }
27 27
28 base::FilePath TestInstaller::GetBackupPath() const {
29 return base::FilePath();
30 }
31
32 void TestInstaller::InstallExternally() {
33 }
34
28 bool TestInstaller::GetInstalledFile(const std::string& file, 35 bool TestInstaller::GetInstalledFile(const std::string& file,
29 base::FilePath* installed_file) { 36 base::FilePath* installed_file) {
30 return false; 37 return false;
31 } 38 }
32 39
33 int TestInstaller::error() const { 40 int TestInstaller::error() const {
34 return error_; 41 return error_;
35 } 42 }
36 43
37 int TestInstaller::install_count() const { 44 int TestInstaller::install_count() const {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 84
78 bool VersionedTestInstaller::GetInstalledFile(const std::string& file, 85 bool VersionedTestInstaller::GetInstalledFile(const std::string& file,
79 base::FilePath* installed_file) { 86 base::FilePath* installed_file) {
80 base::FilePath path; 87 base::FilePath path;
81 path = install_directory_.AppendASCII(current_version_.GetString()); 88 path = install_directory_.AppendASCII(current_version_.GetString());
82 *installed_file = path.Append(base::FilePath::FromUTF8Unsafe(file)); 89 *installed_file = path.Append(base::FilePath::FromUTF8Unsafe(file));
83 return true; 90 return true;
84 } 91 }
85 92
86 } // namespace component_updater 93 } // namespace component_updater
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/test/test_installer.h ('k') | chrome/browser/net/crl_set_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698