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

Side by Side Diff: chrome/browser/ui/views/network_profile_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) 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/views/network_profile_bubble_view.h" 5 #include "chrome/browser/ui/views/network_profile_bubble_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/network_profile_bubble.h" 10 #include "chrome/browser/ui/network_profile_bubble.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 int event_flags) { 124 int event_flags) {
125 NetworkProfileBubble::RecordUmaEvent( 125 NetworkProfileBubble::RecordUmaEvent(
126 NetworkProfileBubble::METRIC_LEARN_MORE_CLICKED); 126 NetworkProfileBubble::METRIC_LEARN_MORE_CLICKED);
127 WindowOpenDisposition disposition = 127 WindowOpenDisposition disposition =
128 ui::DispositionFromEventFlags(event_flags); 128 ui::DispositionFromEventFlags(event_flags);
129 content::OpenURLParams params( 129 content::OpenURLParams params(
130 GURL("https://sites.google.com/a/chromium.org/dev/administrators/" 130 GURL("https://sites.google.com/a/chromium.org/dev/administrators/"
131 "common-problems-and-solutions#network_profile"), 131 "common-problems-and-solutions#network_profile"),
132 content::Referrer(), 132 content::Referrer(),
133 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, 133 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition,
134 content::PAGE_TRANSITION_LINK, false); 134 ui::PAGE_TRANSITION_LINK, false);
135 navigator_->OpenURL(params); 135 navigator_->OpenURL(params);
136 136
137 // If the user interacted with the bubble we don't reduce the number of 137 // If the user interacted with the bubble we don't reduce the number of
138 // warnings left. 138 // warnings left.
139 PrefService* prefs = profile_->GetPrefs(); 139 PrefService* prefs = profile_->GetPrefs();
140 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft); 140 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft);
141 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings); 141 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings);
142 GetWidget()->Close(); 142 GetWidget()->Close();
143 } 143 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_bubble_view.cc ('k') | chrome/browser/ui/views/outdated_upgrade_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698