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

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

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 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
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 "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 NetworkProfileBubble::METRIC_ACKNOWLEDGED); 116 NetworkProfileBubble::METRIC_ACKNOWLEDGED);
117 117
118 GetWidget()->Close(); 118 GetWidget()->Close();
119 } 119 }
120 120
121 void NetworkProfileBubbleView::LinkClicked(views::Link* source, 121 void NetworkProfileBubbleView::LinkClicked(views::Link* source,
122 int event_flags) { 122 int event_flags) {
123 NetworkProfileBubble::RecordUmaEvent( 123 NetworkProfileBubble::RecordUmaEvent(
124 NetworkProfileBubble::METRIC_LEARN_MORE_CLICKED); 124 NetworkProfileBubble::METRIC_LEARN_MORE_CLICKED);
125 WindowOpenDisposition disposition = 125 WindowOpenDisposition disposition =
126 chrome::DispositionFromEventFlags(event_flags); 126 ui::DispositionFromEventFlags(event_flags);
127 content::OpenURLParams params( 127 content::OpenURLParams params(
128 GURL("https://sites.google.com/a/chromium.org/dev/administrators/" 128 GURL("https://sites.google.com/a/chromium.org/dev/administrators/"
129 "common-problems-and-solutions#network_profile"), 129 "common-problems-and-solutions#network_profile"),
130 content::Referrer(), 130 content::Referrer(),
131 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, 131 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition,
132 content::PAGE_TRANSITION_LINK, false); 132 content::PAGE_TRANSITION_LINK, false);
133 navigator_->OpenURL(params); 133 navigator_->OpenURL(params);
134 134
135 // If the user interacted with the bubble we don't reduce the number of 135 // If the user interacted with the bubble we don't reduce the number of
136 // warnings left. 136 // warnings left.
137 PrefService* prefs = profile_->GetPrefs(); 137 PrefService* prefs = profile_->GetPrefs();
138 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft); 138 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft);
139 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings); 139 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings);
140 GetWidget()->Close(); 140 GetWidget()->Close();
141 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/missing_system_file_dialog_win.cc ('k') | chrome/browser/ui/views/reload_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698