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

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

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 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
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_unpacker.h" 5 #include "components/update_client/component_unpacker.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (!base::PathExists(manifest)) 63 if (!base::PathExists(manifest))
64 return scoped_ptr<base::DictionaryValue>(); 64 return scoped_ptr<base::DictionaryValue>();
65 JSONFileValueDeserializer deserializer(manifest); 65 JSONFileValueDeserializer deserializer(manifest);
66 std::string error; 66 std::string error;
67 scoped_ptr<base::Value> root = deserializer.Deserialize(NULL, &error); 67 scoped_ptr<base::Value> root = deserializer.Deserialize(NULL, &error);
68 if (!root.get()) 68 if (!root.get())
69 return scoped_ptr<base::DictionaryValue>(); 69 return scoped_ptr<base::DictionaryValue>();
70 if (!root->IsType(base::Value::TYPE_DICTIONARY)) 70 if (!root->IsType(base::Value::TYPE_DICTIONARY))
71 return scoped_ptr<base::DictionaryValue>(); 71 return scoped_ptr<base::DictionaryValue>();
72 return scoped_ptr<base::DictionaryValue>( 72 return scoped_ptr<base::DictionaryValue>(
73 static_cast<base::DictionaryValue*>(root.release())).Pass(); 73 static_cast<base::DictionaryValue*>(root.release()));
74 } 74 }
75 75
76 bool ComponentUnpacker::UnpackInternal() { 76 bool ComponentUnpacker::UnpackInternal() {
77 return Verify() && Unzip() && BeginPatching(); 77 return Verify() && Unzip() && BeginPatching();
78 } 78 }
79 79
80 void ComponentUnpacker::Unpack(const Callback& callback) { 80 void ComponentUnpacker::Unpack(const Callback& callback) {
81 callback_ = callback; 81 callback_ = callback;
82 if (!UnpackInternal()) 82 if (!UnpackInternal())
83 Finish(); 83 Finish();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (!unpack_path_.empty()) 207 if (!unpack_path_.empty())
208 base::DeleteFile(unpack_path_, true); 208 base::DeleteFile(unpack_path_, true);
209 task_runner_->PostTask(FROM_HERE, 209 task_runner_->PostTask(FROM_HERE,
210 base::Bind(callback_, error_, extended_error_)); 210 base::Bind(callback_, error_, extended_error_));
211 } 211 }
212 212
213 ComponentUnpacker::~ComponentUnpacker() { 213 ComponentUnpacker::~ComponentUnpacker() {
214 } 214 }
215 215
216 } // namespace update_client 216 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/action_update_check.cc ('k') | components/update_client/crx_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698