OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |