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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 const update_client::Callback& callback) override; | 58 const update_client::Callback& callback) override; |
59 bool GetCrxUpdateState( | 59 bool GetCrxUpdateState( |
60 const std::string& id, | 60 const std::string& id, |
61 update_client::CrxUpdateItem* update_item) const override { | 61 update_client::CrxUpdateItem* update_item) const override { |
62 return false; | 62 return false; |
63 } | 63 } |
64 bool IsUpdating(const std::string& id) const override { return false; } | 64 bool IsUpdating(const std::string& id) const override { return false; } |
65 void Stop() override {} | 65 void Stop() override {} |
66 void SendUninstallPing(const std::string& id, | 66 void SendUninstallPing(const std::string& id, |
67 const base::Version& version, | 67 const base::Version& version, |
68 int reason) override { | 68 int reason, |
| 69 const update_client::Callback& callback) override { |
69 uninstall_pings_.emplace_back(id, version, reason); | 70 uninstall_pings_.emplace_back(id, version, reason); |
70 } | 71 } |
71 | 72 |
72 protected: | 73 protected: |
73 friend class base::RefCounted<FakeUpdateClient>; | 74 friend class base::RefCounted<FakeUpdateClient>; |
74 ~FakeUpdateClient() override {} | 75 ~FakeUpdateClient() override {} |
75 | 76 |
76 std::vector<update_client::CrxComponent> data_; | 77 std::vector<update_client::CrxComponent> data_; |
77 std::vector<UninstallPing> uninstall_pings_; | 78 std::vector<UninstallPing> uninstall_pings_; |
78 | 79 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 EXPECT_EQ(*extension3->version(), pings[1].version) << reason; | 346 EXPECT_EQ(*extension3->version(), pings[1].version) << reason; |
346 EXPECT_EQ(reason, pings[1].reason) << reason; | 347 EXPECT_EQ(reason, pings[1].reason) << reason; |
347 | 348 |
348 pings.clear(); | 349 pings.clear(); |
349 } | 350 } |
350 } | 351 } |
351 | 352 |
352 } // namespace | 353 } // namespace |
353 | 354 |
354 } // namespace extensions | 355 } // namespace extensions |
OLD | NEW |