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 "chrome/browser/extensions/api/mdns/mdns_api.h" | 5 #include "chrome/browser/extensions/api/mdns/mdns_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 std::string name, | 238 std::string name, |
239 bool is_platform_app, | 239 bool is_platform_app, |
240 std::string extension_id) { | 240 std::string extension_id) { |
241 base::DictionaryValue manifest; | 241 base::DictionaryValue manifest; |
242 manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0"); | 242 manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0"); |
243 manifest.SetString(extensions::manifest_keys::kName, name); | 243 manifest.SetString(extensions::manifest_keys::kName, name); |
244 if (is_platform_app) { | 244 if (is_platform_app) { |
245 // Setting app.background.page = "background.html" is sufficient to make | 245 // Setting app.background.page = "background.html" is sufficient to make |
246 // the extension type TYPE_PLATFORM_APP. | 246 // the extension type TYPE_PLATFORM_APP. |
247 manifest.Set(extensions::manifest_keys::kPlatformAppBackgroundPage, | 247 manifest.Set(extensions::manifest_keys::kPlatformAppBackgroundPage, |
248 new base::StringValue("background.html")); | 248 new base::Value("background.html")); |
249 } | 249 } |
250 | 250 |
251 std::string error; | 251 std::string error; |
252 return extensions::Extension::Create( | 252 return extensions::Extension::Create( |
253 bogus_file_pathname(name), | 253 bogus_file_pathname(name), |
254 extensions::Manifest::INVALID_LOCATION, | 254 extensions::Manifest::INVALID_LOCATION, |
255 manifest, | 255 manifest, |
256 Extension::NO_FLAGS, | 256 Extension::NO_FLAGS, |
257 extension_id, | 257 extension_id, |
258 &error); | 258 &error); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 render_process_host(), kExtId, filter, false); | 436 render_process_host(), kExtId, filter, false); |
437 | 437 |
438 EXPECT_CALL(*dns_sd_registry(), UnregisterDnsSdListener("_trex._tcp.local")); | 438 EXPECT_CALL(*dns_sd_registry(), UnregisterDnsSdListener("_trex._tcp.local")); |
439 EventRouter::Get(browser_context()) | 439 EventRouter::Get(browser_context()) |
440 ->RemoveFilteredEventListener(api::mdns::OnServiceList::kEventName, | 440 ->RemoveFilteredEventListener(api::mdns::OnServiceList::kEventName, |
441 render_process_host(), kExtId, filter, | 441 render_process_host(), kExtId, filter, |
442 false); | 442 false); |
443 } | 443 } |
444 | 444 |
445 } // namespace extensions | 445 } // namespace extensions |
OLD | NEW |