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

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

Issue 2597513003: [wip-test] Test to see if the bots invoke the Patch() routine (Closed)
Patch Set: Created 4 years 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 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 "chrome/browser/component_updater/component_patcher_operation_out_of_pr ocess.h" 5 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr ocess.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ChromeOutOfProcessPatcher::~ChromeOutOfProcessPatcher() { 94 ChromeOutOfProcessPatcher::~ChromeOutOfProcessPatcher() {
95 } 95 }
96 96
97 void ChromeOutOfProcessPatcher::Patch( 97 void ChromeOutOfProcessPatcher::Patch(
98 const std::string& operation, 98 const std::string& operation,
99 scoped_refptr<base::SequencedTaskRunner> task_runner, 99 scoped_refptr<base::SequencedTaskRunner> task_runner,
100 const base::FilePath& input_abs_path, 100 const base::FilePath& input_abs_path,
101 const base::FilePath& patch_abs_path, 101 const base::FilePath& patch_abs_path,
102 const base::FilePath& output_abs_path, 102 const base::FilePath& output_abs_path,
103 base::Callback<void(int result)> callback) { 103 base::Callback<void(int result)> callback) {
104
105 NOTREACHED(); // HACK to see if any test on the try calls here.
106
104 host_ = new PatchHost(callback, task_runner); 107 host_ = new PatchHost(callback, task_runner);
105 IPC::PlatformFileForTransit input = IPC::TakePlatformFileForTransit( 108 IPC::PlatformFileForTransit input = IPC::TakePlatformFileForTransit(
106 base::File( 109 base::File(
107 input_abs_path, base::File::FLAG_OPEN | base::File::FLAG_READ)); 110 input_abs_path, base::File::FLAG_OPEN | base::File::FLAG_READ));
108 IPC::PlatformFileForTransit patch = IPC::TakePlatformFileForTransit( 111 IPC::PlatformFileForTransit patch = IPC::TakePlatformFileForTransit(
109 base::File( 112 base::File(
110 patch_abs_path, base::File::FLAG_OPEN | base::File::FLAG_READ)); 113 patch_abs_path, base::File::FLAG_OPEN | base::File::FLAG_READ));
111 IPC::PlatformFileForTransit output = IPC::TakePlatformFileForTransit( 114 IPC::PlatformFileForTransit output = IPC::TakePlatformFileForTransit(
112 base::File( 115 base::File(
113 output_abs_path, 116 output_abs_path,
(...skipping 12 matching lines...) Expand all
126 } 129 }
127 130
128 content::BrowserThread::PostTask( 131 content::BrowserThread::PostTask(
129 content::BrowserThread::IO, 132 content::BrowserThread::IO,
130 FROM_HERE, 133 FROM_HERE,
131 base::Bind( 134 base::Bind(
132 &PatchHost::StartProcess, host_, base::Passed(&patch_message))); 135 &PatchHost::StartProcess, host_, base::Passed(&patch_message)));
133 } 136 }
134 137
135 } // namespace component_updater 138 } // namespace component_updater
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