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

Side by Side Diff: chrome/browser/extensions/app_background_page_apitest.cc

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (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
OLDNEW
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 "base/location.h" 5 #include "base/location.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 content::WindowedNotificationObserver watcher( 94 content::WindowedNotificationObserver watcher(
95 chrome::NOTIFICATION_BACKGROUND_MODE_CHANGED, 95 chrome::NOTIFICATION_BACKGROUND_MODE_CHANGED,
96 content::NotificationService::AllSources()); 96 content::NotificationService::AllSources());
97 watcher.Wait(); 97 watcher.Wait();
98 return manager->IsBackgroundModeActive() == expected_background_mode; 98 return manager->IsBackgroundModeActive() == expected_background_mode;
99 #endif 99 #endif
100 } 100 }
101 101
102 void UnloadExtensionViaTask(const std::string& id) { 102 void UnloadExtensionViaTask(const std::string& id) {
103 base::ThreadTaskRunnerHandle::Get()->PostTask( 103 base::ThreadTaskRunnerHandle::Get()->PostTask(
104 FROM_HERE, 104 FROM_HERE, base::BindOnce(&AppBackgroundPageApiTest::UnloadExtension,
105 base::Bind(&AppBackgroundPageApiTest::UnloadExtension, 105 base::Unretained(this), id));
106 base::Unretained(this), id));
107 } 106 }
108 107
109 private: 108 private:
110 base::ScopedTempDir app_dir_; 109 base::ScopedTempDir app_dir_;
111 }; 110 };
112 111
113 namespace { 112 namespace {
114 113
115 // Fixture to assist in testing v2 app background pages containing 114 // Fixture to assist in testing v2 app background pages containing
116 // Native Client embeds. 115 // Native Client embeds.
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 ExtensionTestMessageListener ready_listener("ready", true); 591 ExtensionTestMessageListener ready_listener("ready", true);
593 LaunchTestingApp(); 592 LaunchTestingApp();
594 EXPECT_TRUE(ready_listener.WaitUntilSatisfied()); 593 EXPECT_TRUE(ready_listener.WaitUntilSatisfied());
595 594
596 ExtensionTestMessageListener created_listener("created_module:1", false); 595 ExtensionTestMessageListener created_listener("created_module:1", false);
597 ready_listener.Reply("create_module_without_hack"); 596 ready_listener.Reply("create_module_without_hack");
598 EXPECT_TRUE(created_listener.WaitUntilSatisfied()); 597 EXPECT_TRUE(created_listener.WaitUntilSatisfied());
599 } 598 }
600 599
601 #endif // !defined(DISABLE_NACL) 600 #endif // !defined(DISABLE_NACL)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698