| 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 "content/public/test/mock_render_process_host.h" | 5 #include "content/public/test/mock_render_process_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 return base::TimeDelta::FromMilliseconds(0); | 245 return base::TimeDelta::FromMilliseconds(0); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void MockRenderProcessHost::ResumeRequestsForView(int route_id) { | 248 void MockRenderProcessHost::ResumeRequestsForView(int route_id) { |
| 249 } | 249 } |
| 250 | 250 |
| 251 void MockRenderProcessHost::NotifyTimezoneChange(const std::string& zone_id) { | 251 void MockRenderProcessHost::NotifyTimezoneChange(const std::string& zone_id) { |
| 252 } | 252 } |
| 253 | 253 |
| 254 ServiceRegistry* MockRenderProcessHost::GetServiceRegistry() { | 254 ServiceRegistry* MockRenderProcessHost::GetServiceRegistry() { |
| 255 return NULL; | 255 if (!service_registry_) |
| 256 service_registry_.reset(new ServiceRegistryImpl()); |
| 257 return service_registry_.get(); |
| 256 } | 258 } |
| 257 | 259 |
| 258 const base::TimeTicks& MockRenderProcessHost::GetInitTimeForNavigationMetrics() | 260 const base::TimeTicks& MockRenderProcessHost::GetInitTimeForNavigationMetrics() |
| 259 const { | 261 const { |
| 260 static base::TimeTicks dummy_time = base::TimeTicks::Now(); | 262 static base::TimeTicks dummy_time = base::TimeTicks::Now(); |
| 261 return dummy_time; | 263 return dummy_time; |
| 262 } | 264 } |
| 263 | 265 |
| 264 bool MockRenderProcessHost::SubscribeUniformEnabled() const { | 266 bool MockRenderProcessHost::SubscribeUniformEnabled() const { |
| 265 return false; | 267 return false; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 347 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 346 it != processes_.end(); ++it) { | 348 it != processes_.end(); ++it) { |
| 347 if (*it == host) { | 349 if (*it == host) { |
| 348 processes_.weak_erase(it); | 350 processes_.weak_erase(it); |
| 349 break; | 351 break; |
| 350 } | 352 } |
| 351 } | 353 } |
| 352 } | 354 } |
| 353 | 355 |
| 354 } // content | 356 } // content |
| OLD | NEW |