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

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

Issue 138553004: Move component updater artifacts into component_updater namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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/component_patcher.h" 5 #include "chrome/browser/component_updater/component_patcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/json/json_file_value_serializer.h" 11 #include "base/json/json_file_value_serializer.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/component_updater/component_patcher_operation.h" 13 #include "chrome/browser/component_updater/component_patcher_operation.h"
14 #include "chrome/browser/component_updater/component_updater_service.h" 14 #include "chrome/browser/component_updater/component_updater_service.h"
15 15
16 namespace component_updater {
17
16 namespace { 18 namespace {
17 19
18 // Deserialize the commands file (present in delta update packages). The top 20 // Deserialize the commands file (present in delta update packages). The top
19 // level must be a list. 21 // level must be a list.
20 base::ListValue* ReadCommands(const base::FilePath& unpack_path) { 22 base::ListValue* ReadCommands(const base::FilePath& unpack_path) {
21 const base::FilePath commands = 23 const base::FilePath commands =
22 unpack_path.Append(FILE_PATH_LITERAL("commands.json")); 24 unpack_path.Append(FILE_PATH_LITERAL("commands.json"));
23 if (!base::PathExists(commands)) 25 if (!base::PathExists(commands))
24 return NULL; 26 return NULL;
25 27
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 74
73 ComponentUnpacker::Error result = operation->Run( 75 ComponentUnpacker::Error result = operation->Run(
74 command_args, input_dir, unpack_dir, patcher, installer, error); 76 command_args, input_dir, unpack_dir, patcher, installer, error);
75 if (result != ComponentUnpacker::kNone) 77 if (result != ComponentUnpacker::kNone)
76 return result; 78 return result;
77 } 79 }
78 80
79 return ComponentUnpacker::kNone; 81 return ComponentUnpacker::kNone;
80 } 82 }
81 83
84 } // namespace component_updater
85
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/component_patcher.h ('k') | chrome/browser/component_updater/component_patcher_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698