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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 10882022: UMA: Add PageLoad user action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 content::RecordAction(UserMetricsAction("Home")); 334 content::RecordAction(UserMetricsAction("Home"));
335 browser->OpenURL(OpenURLParams( 335 browser->OpenURL(OpenURLParams(
336 browser->profile()->GetHomePage(), Referrer(), disposition, 336 browser->profile()->GetHomePage(), Referrer(), disposition,
337 content::PageTransitionFromInt( 337 content::PageTransitionFromInt(
338 content::PAGE_TRANSITION_AUTO_BOOKMARK | 338 content::PAGE_TRANSITION_AUTO_BOOKMARK |
339 content::PAGE_TRANSITION_HOME_PAGE), 339 content::PAGE_TRANSITION_HOME_PAGE),
340 false)); 340 false));
341 } 341 }
342 342
343 void OpenCurrentURL(Browser* browser) { 343 void OpenCurrentURL(Browser* browser) {
344 content::RecordAction(UserMetricsAction("LoadURL"));
jar (doing other things) 2012/08/27 21:40:59 Do you have any interest in seeing how these numbe
Mark P 2012/08/27 21:58:46 Good question. I don't see a good reason to compa
jar (doing other things) 2012/08/27 22:11:34 I'm wary that it would instantly "break" the curre
Mark P 2012/08/29 00:17:40 Okay. Restored LoadURL recording. I'll remove in
345 LocationBar* location_bar = browser->window()->GetLocationBar(); 344 LocationBar* location_bar = browser->window()->GetLocationBar();
346 if (!location_bar) 345 if (!location_bar)
347 return; 346 return;
348 347
349 WindowOpenDisposition open_disposition = 348 WindowOpenDisposition open_disposition =
350 location_bar->GetWindowOpenDisposition(); 349 location_bar->GetWindowOpenDisposition();
351 if (browser->instant_controller()->OpenInstant(open_disposition)) 350 if (browser->instant_controller()->OpenInstant(open_disposition))
352 return; 351 return;
353 352
354 GURL url(location_bar->GetInputString()); 353 GURL url(location_bar->GetInputString());
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 if (!tab_contents) 981 if (!tab_contents)
983 tab_contents = new TabContents(contents); 982 tab_contents = new TabContents(contents);
984 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); 983 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true);
985 984
986 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 985 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
987 contents->GetRenderViewHost()->SyncRendererPrefs(); 986 contents->GetRenderViewHost()->SyncRendererPrefs();
988 app_browser->window()->Show(); 987 app_browser->window()->Show();
989 } 988 }
990 989
991 } // namespace chrome 990 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698