OLD | NEW |
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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 const CompletionCallback& completion_callback) override {} | 39 const CompletionCallback& completion_callback) override {} |
40 void Update(const std::vector<std::string>& ids, | 40 void Update(const std::vector<std::string>& ids, |
41 const CrxDataCallback& crx_data_callback, | 41 const CrxDataCallback& crx_data_callback, |
42 const CompletionCallback& completion_callback) override; | 42 const CompletionCallback& completion_callback) override; |
43 bool GetCrxUpdateState( | 43 bool GetCrxUpdateState( |
44 const std::string& id, | 44 const std::string& id, |
45 update_client::CrxUpdateItem* update_item) const override { | 45 update_client::CrxUpdateItem* update_item) const override { |
46 return false; | 46 return false; |
47 } | 47 } |
48 bool IsUpdating(const std::string& id) const override { return false; } | 48 bool IsUpdating(const std::string& id) const override { return false; } |
| 49 void Stop() override {} |
49 | 50 |
50 protected: | 51 protected: |
51 friend class base::RefCounted<FakeUpdateClient>; | 52 friend class base::RefCounted<FakeUpdateClient>; |
52 ~FakeUpdateClient() override {} | 53 ~FakeUpdateClient() override {} |
53 | 54 |
54 std::vector<update_client::CrxComponent> data_; | 55 std::vector<update_client::CrxComponent> data_; |
55 }; | 56 }; |
56 | 57 |
57 FakeUpdateClient::FakeUpdateClient() {} | 58 FakeUpdateClient::FakeUpdateClient() {} |
58 | 59 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 std::vector<FakeExtensionSystem::InstallUpdateRequest>* requests = | 240 std::vector<FakeExtensionSystem::InstallUpdateRequest>* requests = |
240 extension_system()->install_requests(); | 241 extension_system()->install_requests(); |
241 ASSERT_EQ(1u, requests->size()); | 242 ASSERT_EQ(1u, requests->size()); |
242 EXPECT_EQ(requests->at(0).extension_id, extension1->id()); | 243 EXPECT_EQ(requests->at(0).extension_id, extension1->id()); |
243 EXPECT_NE(requests->at(0).temp_dir.value(), new_version_dir.path().value()); | 244 EXPECT_NE(requests->at(0).temp_dir.value(), new_version_dir.path().value()); |
244 } | 245 } |
245 | 246 |
246 } // namespace | 247 } // namespace |
247 | 248 |
248 } // namespace extensions | 249 } // namespace extensions |
OLD | NEW |