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

Side by Side Diff: components/component_updater/component_updater_service_unittest.cc

Issue 2831473002: Add a callback parameter to UpdateClient::SendUninstallPing. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | components/component_updater/default_component_installer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | components/component_updater/default_component_installer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698