OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/component_updater/component_updater_service.h" | 5 #include "components/component_updater/component_updater_service.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const CrxDataCallback& crx_data_callback, | 68 const CrxDataCallback& crx_data_callback, |
69 const Callback& callback)); | 69 const Callback& callback)); |
70 MOCK_METHOD3(Update, | 70 MOCK_METHOD3(Update, |
71 void(const std::vector<std::string>& ids, | 71 void(const std::vector<std::string>& ids, |
72 const CrxDataCallback& crx_data_callback, | 72 const CrxDataCallback& crx_data_callback, |
73 const Callback& callback)); | 73 const Callback& callback)); |
74 MOCK_CONST_METHOD2(GetCrxUpdateState, | 74 MOCK_CONST_METHOD2(GetCrxUpdateState, |
75 bool(const std::string& id, CrxUpdateItem* update_item)); | 75 bool(const std::string& id, CrxUpdateItem* update_item)); |
76 MOCK_CONST_METHOD1(IsUpdating, bool(const std::string& id)); | 76 MOCK_CONST_METHOD1(IsUpdating, bool(const std::string& id)); |
77 MOCK_METHOD0(Stop, void()); | 77 MOCK_METHOD0(Stop, void()); |
78 MOCK_METHOD3( | 78 MOCK_METHOD4(SendUninstallPing, |
79 SendUninstallPing, | 79 void(const std::string& id, |
80 void(const std::string& id, const base::Version& version, int reason)); | 80 const base::Version& version, |
| 81 int reason, |
| 82 const Callback& callback)); |
81 | 83 |
82 private: | 84 private: |
83 ~MockUpdateClient() override; | 85 ~MockUpdateClient() override; |
84 }; | 86 }; |
85 | 87 |
86 class MockServiceObserver : public ServiceObserver { | 88 class MockServiceObserver : public ServiceObserver { |
87 public: | 89 public: |
88 MockServiceObserver(); | 90 MockServiceObserver(); |
89 ~MockServiceObserver() override; | 91 ~MockServiceObserver() override; |
90 | 92 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 base::Bind(&ComponentUpdaterTest::ReadyCallback)); | 401 base::Bind(&ComponentUpdaterTest::ReadyCallback)); |
400 | 402 |
401 RunThreads(); | 403 RunThreads(); |
402 | 404 |
403 ht.ExpectUniqueSample("ComponentUpdater.Calls", 0, 1); | 405 ht.ExpectUniqueSample("ComponentUpdater.Calls", 0, 1); |
404 ht.ExpectUniqueSample("ComponentUpdater.UpdateCompleteResult", 0, 1); | 406 ht.ExpectUniqueSample("ComponentUpdater.UpdateCompleteResult", 0, 1); |
405 ht.ExpectTotalCount("ComponentUpdater.UpdateCompleteTime", 1); | 407 ht.ExpectTotalCount("ComponentUpdater.UpdateCompleteTime", 1); |
406 } | 408 } |
407 | 409 |
408 } // namespace component_updater | 410 } // namespace component_updater |
OLD | NEW |