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

Side by Side Diff: chrome/browser/ui/browser_dialogs.h

Issue 2790723004: Function to count dialog box creations. (Closed)
Patch Set: Move function to browser_dialogs.h Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/browser_dialogs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 content::WebContents* web_contents, 179 content::WebContents* web_contents,
180 const gfx::Point& anchor); 180 const gfx::Point& anchor);
181 private: 181 private:
182 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleViewsBridge); 182 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleViewsBridge);
183 }; 183 };
184 184
185 #endif // OS_MACOSX 185 #endif // OS_MACOSX
186 186
187 #endif // TOOLKIT_VIEWS 187 #endif // TOOLKIT_VIEWS
188 188
189 // Values used in the Dialog.Creation UMA metric. Each value represents a
190 // different type of dialog box.
191 // These values are written to logs. New enum values can be added, but existing
192 // enums must never be renumbered or deleted and reused.
193 enum class DialogIdentifier { UNKNOWN = 0, TRANSLATE = 1, MAX_VALUE };
194
195 // Record an UMA metric counting the creation of a dialog box of this type.
196 void RecordDialogCreation(DialogIdentifier identifier);
197
189 } // namespace chrome 198 } // namespace chrome
190 199
191 #if defined(OS_CHROMEOS) 200 #if defined(OS_CHROMEOS)
192 201
193 // This callback informs the package name of the app selected by the user, along 202 // This callback informs the package name of the app selected by the user, along
194 // with the reason why the Bubble was closed. The string param must have a valid 203 // with the reason why the Bubble was closed. The string param must have a valid
195 // package name, except when the CloseReason is ERROR or DIALOG_DEACTIVATED, for 204 // package name, except when the CloseReason is ERROR or DIALOG_DEACTIVATED, for
196 // these cases we return a dummy value which won't be used at all and has no 205 // these cases we return a dummy value which won't be used at all and has no
197 // significance. 206 // significance.
198 using IntentPickerResponse = 207 using IntentPickerResponse =
199 base::Callback<void(const std::string&, 208 base::Callback<void(const std::string&,
200 arc::ArcNavigationThrottle::CloseReason)>; 209 arc::ArcNavigationThrottle::CloseReason)>;
201 210
202 // Return a pointer to the IntentPickerBubbleView::ShowBubble method. 211 // Return a pointer to the IntentPickerBubbleView::ShowBubble method.
203 using BubbleShowPtr = 212 using BubbleShowPtr =
204 void (*)(content::WebContents*, 213 void (*)(content::WebContents*,
205 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, 214 const std::vector<arc::ArcNavigationThrottle::AppInfo>&,
206 const IntentPickerResponse&); 215 const IntentPickerResponse&);
207 216
208 BubbleShowPtr ShowIntentPickerBubble(); 217 BubbleShowPtr ShowIntentPickerBubble();
209 218
210 #endif // OS_CHROMEOS 219 #endif // OS_CHROMEOS
211 220
212 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ 221 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/browser_dialogs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698