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

Side by Side Diff: extensions/shell/browser/shell_extensions_browser_client.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, 5 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/shell/browser/shell_extensions_browser_client.h" 5 #include "extensions/shell/browser/shell_extensions_browser_client.h"
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "extensions/browser/api/extensions_api_client.h" 10 #include "extensions/browser/api/extensions_api_client.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 BrowserThread::PostTask( 208 BrowserThread::PostTask(
209 BrowserThread::UI, 209 BrowserThread::UI,
210 FROM_HERE, 210 FROM_HERE,
211 base::Bind(&ShellExtensionsBrowserClient::BroadcastEventToRenderers, 211 base::Bind(&ShellExtensionsBrowserClient::BroadcastEventToRenderers,
212 base::Unretained(this), 212 base::Unretained(this),
213 event_name, 213 event_name,
214 base::Passed(&args))); 214 base::Passed(&args)));
215 return; 215 return;
216 } 216 }
217 217
218 scoped_ptr<Event> event(new Event(event_name, args.Pass())); 218 scoped_ptr<Event> event(new Event(events::UNKNOWN, event_name, args.Pass()));
219 EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); 219 EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass());
220 } 220 }
221 221
222 net::NetLog* ShellExtensionsBrowserClient::GetNetLog() { 222 net::NetLog* ShellExtensionsBrowserClient::GetNetLog() {
223 return NULL; 223 return NULL;
224 } 224 }
225 225
226 ExtensionCache* ShellExtensionsBrowserClient::GetExtensionCache() { 226 ExtensionCache* ShellExtensionsBrowserClient::GetExtensionCache() {
227 return extension_cache_.get(); 227 return extension_cache_.get();
228 } 228 }
(...skipping 12 matching lines...) Expand all
241 api_client_.reset(api_client); 241 api_client_.reset(api_client);
242 } 242 }
243 243
244 ExtensionWebContentsObserver* 244 ExtensionWebContentsObserver*
245 ShellExtensionsBrowserClient::GetExtensionWebContentsObserver( 245 ShellExtensionsBrowserClient::GetExtensionWebContentsObserver(
246 content::WebContents* web_contents) { 246 content::WebContents* web_contents) {
247 return ShellExtensionWebContentsObserver::FromWebContents(web_contents); 247 return ShellExtensionWebContentsObserver::FromWebContents(web_contents);
248 } 248 }
249 249
250 } // namespace extensions 250 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_function_histogram_value.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698