| 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 {} | |
| 50 | 49 |
| 51 protected: | 50 protected: |
| 52 friend class base::RefCounted<FakeUpdateClient>; | 51 friend class base::RefCounted<FakeUpdateClient>; |
| 53 ~FakeUpdateClient() override {} | 52 ~FakeUpdateClient() override {} |
| 54 | 53 |
| 55 std::vector<update_client::CrxComponent> data_; | 54 std::vector<update_client::CrxComponent> data_; |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 FakeUpdateClient::FakeUpdateClient() {} | 57 FakeUpdateClient::FakeUpdateClient() {} |
| 59 | 58 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 std::vector<FakeExtensionSystem::InstallUpdateRequest>* requests = | 239 std::vector<FakeExtensionSystem::InstallUpdateRequest>* requests = |
| 241 extension_system()->install_requests(); | 240 extension_system()->install_requests(); |
| 242 ASSERT_EQ(1u, requests->size()); | 241 ASSERT_EQ(1u, requests->size()); |
| 243 EXPECT_EQ(requests->at(0).extension_id, extension1->id()); | 242 EXPECT_EQ(requests->at(0).extension_id, extension1->id()); |
| 244 EXPECT_NE(requests->at(0).temp_dir.value(), new_version_dir.path().value()); | 243 EXPECT_NE(requests->at(0).temp_dir.value(), new_version_dir.path().value()); |
| 245 } | 244 } |
| 246 | 245 |
| 247 } // namespace | 246 } // namespace |
| 248 | 247 |
| 249 } // namespace extensions | 248 } // namespace extensions |
| OLD | NEW |