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

Side by Side Diff: chrome/browser/ui/views/outdated_upgrade_bubble_view.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/views/outdated_upgrade_bubble_view.h" 5 #include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/ui/layout_constants.h" 10 #include "chrome/browser/ui/layout_constants.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Offset the +1 in the dtor. 118 // Offset the +1 in the dtor.
119 --g_num_ignored_bubbles; 119 --g_num_ignored_bubbles;
120 120
121 if (auto_update_enabled_) { 121 if (auto_update_enabled_) {
122 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install()); 122 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install());
123 UMA_HISTOGRAM_CUSTOM_COUNTS("OutdatedUpgradeBubble.NumLaterPerReinstall", 123 UMA_HISTOGRAM_CUSTOM_COUNTS("OutdatedUpgradeBubble.NumLaterPerReinstall",
124 g_num_ignored_bubbles, 1, kMaxIgnored, 124 g_num_ignored_bubbles, 1, kMaxIgnored,
125 kNumIgnoredBuckets); 125 kNumIgnoredBuckets);
126 content::RecordAction( 126 content::RecordAction(
127 base::UserMetricsAction("OutdatedUpgradeBubble.Reinstall")); 127 base::UserMetricsAction("OutdatedUpgradeBubble.Reinstall"));
128 navigator_->OpenURL(content::OpenURLParams( 128 navigator_->OpenURL(
129 GURL(kDownloadChromeUrl), content::Referrer(), NEW_FOREGROUND_TAB, 129 content::OpenURLParams(GURL(kDownloadChromeUrl), content::Referrer(),
130 ui::PAGE_TRANSITION_LINK, false)); 130 WindowOpenDisposition::NEW_FOREGROUND_TAB,
131 ui::PAGE_TRANSITION_LINK, false));
131 #if defined(OS_WIN) 132 #if defined(OS_WIN)
132 } else { 133 } else {
133 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install_no_au()); 134 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install_no_au());
134 UMA_HISTOGRAM_CUSTOM_COUNTS("OutdatedUpgradeBubble.NumLaterPerEnableAU", 135 UMA_HISTOGRAM_CUSTOM_COUNTS("OutdatedUpgradeBubble.NumLaterPerEnableAU",
135 g_num_ignored_bubbles, 1, kMaxIgnored, 136 g_num_ignored_bubbles, 1, kMaxIgnored,
136 kNumIgnoredBuckets); 137 kNumIgnoredBuckets);
137 content::RecordAction( 138 content::RecordAction(
138 base::UserMetricsAction("OutdatedUpgradeBubble.EnableAU")); 139 base::UserMetricsAction("OutdatedUpgradeBubble.EnableAU"));
139 // Record that the autoupdate flavour of the dialog has been shown. 140 // Record that the autoupdate flavour of the dialog has been shown.
140 if (g_browser_process->local_state()) { 141 if (g_browser_process->local_state()) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 views::View* anchor_view, 186 views::View* anchor_view,
186 content::PageNavigator* navigator, 187 content::PageNavigator* navigator,
187 bool auto_update_enabled) 188 bool auto_update_enabled)
188 : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), 189 : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
189 auto_update_enabled_(auto_update_enabled), 190 auto_update_enabled_(auto_update_enabled),
190 navigator_(navigator) { 191 navigator_(navigator) {
191 // Compensate for built-in vertical padding in the anchor view's image. 192 // Compensate for built-in vertical padding in the anchor view's image.
192 set_anchor_view_insets(gfx::Insets( 193 set_anchor_view_insets(gfx::Insets(
193 GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0)); 194 GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0));
194 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698