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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 bool ok = false; | 493 bool ok = false; |
494 plugin_prefs->EnablePlugin(enabled, plugin->path, | 494 plugin_prefs->EnablePlugin(enabled, plugin->path, |
495 base::Bind(CopyValueAndQuit<bool>, &ok)); | 495 base::Bind(CopyValueAndQuit<bool>, &ok)); |
496 content::RunMessageLoop(); | 496 content::RunMessageLoop(); |
497 return ok; | 497 return ok; |
498 } | 498 } |
499 | 499 |
500 int CountPluginsOnIOThread() { | 500 int CountPluginsOnIOThread() { |
501 int count = 0; | 501 int count = 0; |
502 for (content::BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { | 502 for (content::BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { |
503 if (iter.GetData().process_type == content::PROCESS_TYPE_PLUGIN || | 503 if (iter.GetData().process_type == content::PROCESS_TYPE_PPAPI_PLUGIN) { |
504 iter.GetData().process_type == content::PROCESS_TYPE_PPAPI_PLUGIN) { | |
505 count++; | 504 count++; |
506 } | 505 } |
507 } | 506 } |
508 return count; | 507 return count; |
509 } | 508 } |
510 | 509 |
511 int CountPlugins() { | 510 int CountPlugins() { |
512 int count = -1; | 511 int count = -1; |
513 BrowserThread::PostTaskAndReplyWithResult( | 512 BrowserThread::PostTaskAndReplyWithResult( |
514 BrowserThread::IO, FROM_HERE, | 513 BrowserThread::IO, FROM_HERE, |
(...skipping 3562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4077 nullptr); | 4076 nullptr); |
4078 UpdateProviderPolicy(policies); | 4077 UpdateProviderPolicy(policies); |
4079 EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled)); | 4078 EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled)); |
4080 EXPECT_EQ(arc::ArcBridgeService::State::STOPPED, arc_bridge_service->state()); | 4079 EXPECT_EQ(arc::ArcBridgeService::State::STOPPED, arc_bridge_service->state()); |
4081 | 4080 |
4082 TearDownTest(); | 4081 TearDownTest(); |
4083 } | 4082 } |
4084 #endif // defined(OS_CHROMEOS) | 4083 #endif // defined(OS_CHROMEOS) |
4085 | 4084 |
4086 } // namespace policy | 4085 } // namespace policy |
OLD | NEW |