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

Side by Side Diff: content/browser/battery_status/battery_monitor_integration_browsertest.cc

Issue 2613803003: Simplifying ContentBrowserClient::GetAdditionalMappedFiles...() (Closed)
Patch Set: Addressed jam@'s comment Created 3 years, 11 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 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 <utility> 5 #include <utility>
6 6
7 #include "base/callback_list.h" 7 #include "base/callback_list.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 int child_process_id) override { 102 int child_process_id) override {
103 // Necessary for passing kIsolateSitesForTesting flag to the renderer. 103 // Necessary for passing kIsolateSitesForTesting flag to the renderer.
104 ShellContentBrowserClient::Get()->AppendExtraCommandLineSwitches( 104 ShellContentBrowserClient::Get()->AppendExtraCommandLineSwitches(
105 command_line, child_process_id); 105 command_line, child_process_id);
106 } 106 }
107 107
108 #if defined(OS_ANDROID) 108 #if defined(OS_ANDROID)
109 void GetAdditionalMappedFilesForChildProcess( 109 void GetAdditionalMappedFilesForChildProcess(
110 const base::CommandLine& command_line, 110 const base::CommandLine& command_line,
111 int child_process_id, 111 int child_process_id,
112 FileDescriptorInfo* mappings, 112 FileDescriptorInfo* mappings) override {
113 std::map<int, base::MemoryMappedFile::Region>* regions) override {
114 ShellContentBrowserClient::Get()->GetAdditionalMappedFilesForChildProcess( 113 ShellContentBrowserClient::Get()->GetAdditionalMappedFilesForChildProcess(
115 command_line, child_process_id, mappings, regions); 114 command_line, child_process_id, mappings);
116 } 115 }
117 #endif // defined(OS_ANDROID) 116 #endif // defined(OS_ANDROID)
118 }; 117 };
119 118
120 class BatteryMonitorIntegrationTest : public ContentBrowserTest { 119 class BatteryMonitorIntegrationTest : public ContentBrowserTest {
121 public: 120 public:
122 BatteryMonitorIntegrationTest() {} 121 BatteryMonitorIntegrationTest() {}
123 122
124 void SetUpOnMainThread() override { 123 void SetUpOnMainThread() override {
125 old_client_ = SetBrowserClientForTesting(&test_client_); 124 old_client_ = SetBrowserClientForTesting(&test_client_);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 TestNavigationObserver same_tab_observer2(shell()->web_contents(), 1); 181 TestNavigationObserver same_tab_observer2(shell()->web_contents(), 1);
183 status.level = 0.6; 182 status.level = 0.6;
184 UpdateBattery(status); 183 UpdateBattery(status);
185 same_tab_observer2.Wait(); 184 same_tab_observer2.Wait();
186 EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref()); 185 EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref());
187 } 186 }
188 187
189 } // namespace 188 } // namespace
190 189
191 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/child_process_launcher_android.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698