| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override { | 129 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override { |
| 130 return task_runner_; | 130 return task_runner_; |
| 131 } | 131 } |
| 132 | 132 |
| 133 bool GetComponentDetails(const std::string& component_id, | 133 bool GetComponentDetails(const std::string& component_id, |
| 134 CrxUpdateItem* item) const override { | 134 CrxUpdateItem* item) const override { |
| 135 ADD_FAILURE(); | 135 ADD_FAILURE(); |
| 136 return false; | 136 return false; |
| 137 } | 137 } |
| 138 | 138 |
| 139 std::unique_ptr<ComponentInfo> GetComponentForMimeType( |
| 140 const std::string& mime_type) const override { |
| 141 return nullptr; |
| 142 } |
| 143 |
| 139 // OnDemandUpdater implementation: | 144 // OnDemandUpdater implementation: |
| 140 bool OnDemandUpdate(const std::string& crx_id) override { | 145 bool OnDemandUpdate(const std::string& crx_id) override { |
| 141 on_demand_update_called_ = true; | 146 on_demand_update_called_ = true; |
| 142 | 147 |
| 143 if (!component_) { | 148 if (!component_) { |
| 144 ADD_FAILURE() << "Trying to update unregistered component " << crx_id; | 149 ADD_FAILURE() << "Trying to update unregistered component " << crx_id; |
| 145 return false; | 150 return false; |
| 146 } | 151 } |
| 147 | 152 |
| 148 EXPECT_EQ(GetCrxComponentID(*component_), crx_id); | 153 EXPECT_EQ(GetCrxComponentID(*component_), crx_id); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 // but it exercises a different code path. | 423 // but it exercises a different code path. |
| 419 profile_attributes_storage()->RemoveProfile(GetProfilePath(kOtherClientId)); | 424 profile_attributes_storage()->RemoveProfile(GetProfilePath(kOtherClientId)); |
| 420 run_loop.RunUntilIdle(); | 425 run_loop.RunUntilIdle(); |
| 421 } | 426 } |
| 422 EXPECT_FALSE(component_update_service_.registered_component()); | 427 EXPECT_FALSE(component_update_service_.registered_component()); |
| 423 EXPECT_FALSE(base::DirectoryExists(whitelist_directory_)); | 428 EXPECT_FALSE(base::DirectoryExists(whitelist_directory_)); |
| 424 EXPECT_FALSE(base::PathExists(whitelist_path_)); | 429 EXPECT_FALSE(base::PathExists(whitelist_path_)); |
| 425 } | 430 } |
| 426 | 431 |
| 427 } // namespace component_updater | 432 } // namespace component_updater |
| OLD | NEW |