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

Side by Side Diff: extensions/browser/updater/update_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 | « extensions/browser/updater/update_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « extensions/browser/updater/update_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698