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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (auto_update_enabled_) { 207 if (auto_update_enabled_) {
208 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install()); 208 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install());
209 UMA_HISTOGRAM_CUSTOM_COUNTS( 209 UMA_HISTOGRAM_CUSTOM_COUNTS(
210 "OutdatedUpgradeBubble.NumLaterPerReinstall", num_ignored_bubbles_, 210 "OutdatedUpgradeBubble.NumLaterPerReinstall", num_ignored_bubbles_,
211 0, kMaxIgnored, kNumIgnoredBuckets); 211 0, kMaxIgnored, kNumIgnoredBuckets);
212 content::RecordAction( 212 content::RecordAction(
213 base::UserMetricsAction("OutdatedUpgradeBubble.Reinstall")); 213 base::UserMetricsAction("OutdatedUpgradeBubble.Reinstall"));
214 navigator_->OpenURL(content::OpenURLParams(GURL(kDownloadChromeUrl), 214 navigator_->OpenURL(content::OpenURLParams(GURL(kDownloadChromeUrl),
215 content::Referrer(), 215 content::Referrer(),
216 NEW_FOREGROUND_TAB, 216 NEW_FOREGROUND_TAB,
217 content::PAGE_TRANSITION_LINK, 217 ui::PAGE_TRANSITION_LINK,
218 false)); 218 false));
219 #if defined(OS_WIN) 219 #if defined(OS_WIN)
220 } else { 220 } else {
221 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install_no_au()); 221 DCHECK(UpgradeDetector::GetInstance()->is_outdated_install_no_au());
222 UMA_HISTOGRAM_CUSTOM_COUNTS( 222 UMA_HISTOGRAM_CUSTOM_COUNTS(
223 "OutdatedUpgradeBubble.NumLaterPerEnableAU", num_ignored_bubbles_, 223 "OutdatedUpgradeBubble.NumLaterPerEnableAU", num_ignored_bubbles_,
224 0, kMaxIgnored, kNumIgnoredBuckets); 224 0, kMaxIgnored, kNumIgnoredBuckets);
225 content::RecordAction( 225 content::RecordAction(
226 base::UserMetricsAction("OutdatedUpgradeBubble.EnableAU")); 226 base::UserMetricsAction("OutdatedUpgradeBubble.EnableAU"));
227 // Record that the autoupdate flavour of the dialog has been shown. 227 // Record that the autoupdate flavour of the dialog has been shown.
228 if (g_browser_process->local_state()) { 228 if (g_browser_process->local_state()) {
229 g_browser_process->local_state()->SetBoolean( 229 g_browser_process->local_state()->SetBoolean(
230 prefs::kAttemptedToEnableAutoupdate, true); 230 prefs::kAttemptedToEnableAutoupdate, true);
231 } 231 }
232 232
233 // Re-enable updates by shelling out to setup.exe in the blocking pool. 233 // Re-enable updates by shelling out to setup.exe in the blocking pool.
234 content::BrowserThread::PostBlockingPoolTask( 234 content::BrowserThread::PostBlockingPoolTask(
235 FROM_HERE, 235 FROM_HERE,
236 base::Bind(&google_update::ElevateIfNeededToReenableUpdates)); 236 base::Bind(&google_update::ElevateIfNeededToReenableUpdates));
237 #endif // defined(OS_WIN) 237 #endif // defined(OS_WIN)
238 } 238 }
239 } else { 239 } else {
240 DCHECK_EQ(later_button_, sender); 240 DCHECK_EQ(later_button_, sender);
241 content::RecordAction( 241 content::RecordAction(
242 base::UserMetricsAction("OutdatedUpgradeBubble.Later")); 242 base::UserMetricsAction("OutdatedUpgradeBubble.Later"));
243 } 243 }
244 GetWidget()->Close(); 244 GetWidget()->Close();
245 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698