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

Side by Side Diff: components/update_client/component_patcher.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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/update_client/component_patcher.h" 5 #include "components/update_client/component_patcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 PatchNextFile(); 73 PatchNextFile();
74 } 74 }
75 } 75 }
76 76
77 void ComponentPatcher::PatchNextFile() { 77 void ComponentPatcher::PatchNextFile() {
78 if (next_command_ == commands_->end()) { 78 if (next_command_ == commands_->end()) {
79 DonePatching(UnpackerError::kNone, 0); 79 DonePatching(UnpackerError::kNone, 0);
80 return; 80 return;
81 } 81 }
82 const base::DictionaryValue* command_args; 82 const base::DictionaryValue* command_args;
83 if (!next_command_->GetAsDictionary(&command_args)) { 83 if (!(*next_command_)->GetAsDictionary(&command_args)) {
84 DonePatching(UnpackerError::kDeltaBadCommands, 0); 84 DonePatching(UnpackerError::kDeltaBadCommands, 0);
85 return; 85 return;
86 } 86 }
87 87
88 std::string operation; 88 std::string operation;
89 if (command_args->GetString(kOp, &operation)) { 89 if (command_args->GetString(kOp, &operation)) {
90 current_operation_ = 90 current_operation_ =
91 CreateDeltaUpdateOp(operation, out_of_process_patcher_); 91 CreateDeltaUpdateOp(operation, out_of_process_patcher_);
92 } 92 }
93 93
(...skipping 18 matching lines...) Expand all
112 } 112 }
113 113
114 void ComponentPatcher::DonePatching(UnpackerError error, int extended_error) { 114 void ComponentPatcher::DonePatching(UnpackerError error, int extended_error) {
115 current_operation_ = NULL; 115 current_operation_ = NULL;
116 task_runner_->PostTask(FROM_HERE, 116 task_runner_->PostTask(FROM_HERE,
117 base::Bind(callback_, error, extended_error)); 117 base::Bind(callback_, error, extended_error));
118 callback_.Reset(); 118 callback_.Reset();
119 } 119 }
120 120
121 } // namespace update_client 121 } // namespace update_client
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_prefs.cc ('k') | components/url_matcher/url_matcher_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698