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

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

Issue 2577183002: Add UMA for the number of devices in the chooser when a device is paired (Closed)
Patch Set: address comments Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/chrome_extensions_browser_client.h" 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 402
403 std::unique_ptr<ExtensionApiFrameIdMapHelper> 403 std::unique_ptr<ExtensionApiFrameIdMapHelper>
404 ChromeExtensionsBrowserClient::CreateExtensionApiFrameIdMapHelper( 404 ChromeExtensionsBrowserClient::CreateExtensionApiFrameIdMapHelper(
405 ExtensionApiFrameIdMap* map) { 405 ExtensionApiFrameIdMap* map) {
406 return base::MakeUnique<ChromeExtensionApiFrameIdMapHelper>(map); 406 return base::MakeUnique<ChromeExtensionApiFrameIdMapHelper>(map);
407 } 407 }
408 408
409 std::unique_ptr<content::BluetoothChooser> 409 std::unique_ptr<content::BluetoothChooser>
410 ChromeExtensionsBrowserClient::CreateBluetoothChooser( 410 ChromeExtensionsBrowserClient::CreateBluetoothChooser(
411 content::RenderFrameHost* frame, 411 content::RenderFrameHost* frame,
412 const content::BluetoothChooser::EventHandler& event_handler) { 412 const content::BluetoothChooser::EventHandler& event_handler,
413 return base::MakeUnique<ChromeExtensionBluetoothChooser>(frame, 413 bool accept_all_devices) {
414 event_handler); 414 return base::MakeUnique<ChromeExtensionBluetoothChooser>(frame, event_handler,
415 accept_all_devices);
415 } 416 }
416 417
417 bool ChromeExtensionsBrowserClient::IsActivityLoggingEnabled( 418 bool ChromeExtensionsBrowserClient::IsActivityLoggingEnabled(
418 content::BrowserContext* context) { 419 content::BrowserContext* context) {
419 ActivityLog* activity_log = ActivityLog::GetInstance(context); 420 ActivityLog* activity_log = ActivityLog::GetInstance(context);
420 return activity_log && activity_log->is_active(); 421 return activity_log && activity_log->is_active();
421 } 422 }
422 423
423 ExtensionNavigationUIData* 424 ExtensionNavigationUIData*
424 ChromeExtensionsBrowserClient::GetExtensionNavigationUIData( 425 ChromeExtensionsBrowserClient::GetExtensionNavigationUIData(
425 net::URLRequest* request) { 426 net::URLRequest* request) {
426 const content::ResourceRequestInfo* info = 427 const content::ResourceRequestInfo* info =
427 content::ResourceRequestInfo::ForRequest(request); 428 content::ResourceRequestInfo::ForRequest(request);
428 if (!info) 429 if (!info)
429 return nullptr; 430 return nullptr;
430 ChromeNavigationUIData* navigation_data = 431 ChromeNavigationUIData* navigation_data =
431 static_cast<ChromeNavigationUIData*>(info->GetNavigationUIData()); 432 static_cast<ChromeNavigationUIData*>(info->GetNavigationUIData());
432 if (!navigation_data) 433 if (!navigation_data)
433 return nullptr; 434 return nullptr;
434 return navigation_data->GetExtensionNavigationUIData(); 435 return navigation_data->GetExtensionNavigationUIData();
435 } 436 }
436 437
437 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() { 438 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() {
438 if (!kiosk_delegate_) 439 if (!kiosk_delegate_)
439 kiosk_delegate_.reset(new ChromeKioskDelegate()); 440 kiosk_delegate_.reset(new ChromeKioskDelegate());
440 return kiosk_delegate_.get(); 441 return kiosk_delegate_.get();
441 } 442 }
442 443
443 } // namespace extensions 444 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698