| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } | 96 } |
| 97 | 97 |
| 98 void OnExternalProviderReady( | 98 void OnExternalProviderReady( |
| 99 const ExternalProviderInterface* provider) override { | 99 const ExternalProviderInterface* provider) override { |
| 100 EXPECT_EQ(provider, provider_.get()); | 100 EXPECT_EQ(provider, provider_.get()); |
| 101 EXPECT_TRUE(provider->IsReady()); | 101 EXPECT_TRUE(provider->IsReady()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void OnExternalProviderUpdateComplete( | 104 void OnExternalProviderUpdateComplete( |
| 105 const ExternalProviderInterface* provider, | 105 const ExternalProviderInterface* provider, |
| 106 const ScopedVector<ExternalInstallInfoUpdateUrl>& update_url_extensions, | 106 const std::vector<std::unique_ptr<ExternalInstallInfoUpdateUrl>>& |
| 107 const ScopedVector<ExternalInstallInfoFile>& file_extensions, | 107 update_url_extensions, |
| 108 const std::vector<std::unique_ptr<ExternalInstallInfoFile>>& |
| 109 file_extensions, |
| 108 const std::set<std::string>& removed_extensions) override { | 110 const std::set<std::string>& removed_extensions) override { |
| 109 ADD_FAILURE() << "Only win registry provider is expected to call this."; | 111 ADD_FAILURE() << "Only win registry provider is expected to call this."; |
| 110 } | 112 } |
| 111 | 113 |
| 112 private: | 114 private: |
| 113 std::set<std::string> expected_extensions_; | 115 std::set<std::string> expected_extensions_; |
| 114 | 116 |
| 115 std::unique_ptr<TestingProfile> profile_; | 117 std::unique_ptr<TestingProfile> profile_; |
| 116 | 118 |
| 117 std::unique_ptr<ExternalProviderImpl> provider_; | 119 std::unique_ptr<ExternalProviderImpl> provider_; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 148 forced_extensions.SetString("invalid", "http://www.example.com/crx"); | 150 forced_extensions.SetString("invalid", "http://www.example.com/crx"); |
| 149 forced_extensions.SetString("dddddddddddddddddddddddddddddddd", | 151 forced_extensions.SetString("dddddddddddddddddddddddddddddddd", |
| 150 std::string()); | 152 std::string()); |
| 151 forced_extensions.SetString("invalid", "bad"); | 153 forced_extensions.SetString("invalid", "bad"); |
| 152 | 154 |
| 153 MockExternalPolicyProviderVisitor mv; | 155 MockExternalPolicyProviderVisitor mv; |
| 154 mv.Visit(forced_extensions, expected_extensions); | 156 mv.Visit(forced_extensions, expected_extensions); |
| 155 } | 157 } |
| 156 | 158 |
| 157 } // namespace extensions | 159 } // namespace extensions |
| OLD | NEW |