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

Side by Side Diff: chrome/browser/devtools/device/devtools_android_bridge.cc

Issue 1481443002: [DevTools] Fix browser crash when instantiating AbdTargetUIHandler for incognito profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_targets_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/devtools/device/devtools_android_bridge.h" 5 #include "chrome/browser/devtools/device/devtools_android_bridge.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 // static 260 // static
261 DevToolsAndroidBridge::Factory* DevToolsAndroidBridge::Factory::GetInstance() { 261 DevToolsAndroidBridge::Factory* DevToolsAndroidBridge::Factory::GetInstance() {
262 return base::Singleton<DevToolsAndroidBridge::Factory>::get(); 262 return base::Singleton<DevToolsAndroidBridge::Factory>::get();
263 } 263 }
264 264
265 // static 265 // static
266 DevToolsAndroidBridge* DevToolsAndroidBridge::Factory::GetForProfile( 266 DevToolsAndroidBridge* DevToolsAndroidBridge::Factory::GetForProfile(
267 Profile* profile) { 267 Profile* profile) {
268 return static_cast<DevToolsAndroidBridge*>(GetInstance()-> 268 return static_cast<DevToolsAndroidBridge*>(GetInstance()->
269 GetServiceForBrowserContext(profile, true)); 269 GetServiceForBrowserContext(profile->GetOriginalProfile(), true));
270 } 270 }
271 271
272 DevToolsAndroidBridge::Factory::Factory() 272 DevToolsAndroidBridge::Factory::Factory()
273 : BrowserContextKeyedServiceFactory( 273 : BrowserContextKeyedServiceFactory(
274 "DevToolsAndroidBridge", 274 "DevToolsAndroidBridge",
275 BrowserContextDependencyManager::GetInstance()) { 275 BrowserContextDependencyManager::GetInstance()) {
276 if (IsWebRTCDeviceProviderEnabled()) { 276 if (IsWebRTCDeviceProviderEnabled()) {
277 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 277 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
278 DependsOn(SigninManagerFactory::GetInstance()); 278 DependsOn(SigninManagerFactory::GetInstance());
279 } 279 }
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 device_providers.push_back( 963 device_providers.push_back(
964 new WebRTCDeviceProvider(profile_, signin_manager_, token_service_)); 964 new WebRTCDeviceProvider(profile_, signin_manager_, token_service_));
965 } 965 }
966 966
967 device_manager_->SetDeviceProviders(device_providers); 967 device_manager_->SetDeviceProviders(device_providers);
968 if (NeedsDeviceListPolling()) { 968 if (NeedsDeviceListPolling()) {
969 StopDeviceListPolling(); 969 StopDeviceListPolling();
970 StartDeviceListPolling(); 970 StartDeviceListPolling();
971 } 971 }
972 } 972 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_targets_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698