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

Side by Side Diff: extensions/browser/api/bluetooth/bluetooth_api_pairing_delegate.cc

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 years, 6 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 "extensions/browser/api/bluetooth/bluetooth_api_pairing_delegate.h" 5 #include "extensions/browser/api/bluetooth/bluetooth_api_pairing_delegate.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "device/bluetooth/bluetooth_device.h" 10 #include "device/bluetooth/bluetooth_device.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bt_private::PairingEvent event; 95 bt_private::PairingEvent event;
96 PopulatePairingEvent( 96 PopulatePairingEvent(
97 device, bt_private::PAIRING_EVENT_TYPE_REQUESTAUTHORIZATION, &event); 97 device, bt_private::PAIRING_EVENT_TYPE_REQUESTAUTHORIZATION, &event);
98 DispatchPairingEvent(event); 98 DispatchPairingEvent(event);
99 } 99 }
100 100
101 void BluetoothApiPairingDelegate::DispatchPairingEvent( 101 void BluetoothApiPairingDelegate::DispatchPairingEvent(
102 const bt_private::PairingEvent& pairing_event) { 102 const bt_private::PairingEvent& pairing_event) {
103 scoped_ptr<base::ListValue> args = 103 scoped_ptr<base::ListValue> args =
104 bt_private::OnPairing::Create(pairing_event); 104 bt_private::OnPairing::Create(pairing_event);
105 scoped_ptr<Event> event( 105 scoped_ptr<Event> event(new Event(
106 new Event(bt_private::OnPairing::kEventName, args.Pass())); 106 events::UNKNOWN, bt_private::OnPairing::kEventName, args.Pass()));
107 EventRouter::Get(browser_context_) 107 EventRouter::Get(browser_context_)
108 ->DispatchEventToExtension(extension_id_, event.Pass()); 108 ->DispatchEventToExtension(extension_id_, event.Pass());
109 } 109 }
110 110
111 } // namespace extensions 111 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/audio/audio_api.cc ('k') | extensions/browser/api/bluetooth/bluetooth_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698