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

Side by Side Diff: chrome/browser/ui/search_engines/edit_search_engine_controller.h

Issue 1410823003: Add UMA for window.external.AddSearchProvider (Chrome side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 15 matching lines...) Expand all
26 const std::string& url) = 0; 26 const std::string& url) = 0;
27 27
28 protected: 28 protected:
29 virtual ~EditSearchEngineControllerDelegate() {} 29 virtual ~EditSearchEngineControllerDelegate() {}
30 }; 30 };
31 31
32 // EditSearchEngineController provides the core platform independent logic 32 // EditSearchEngineController provides the core platform independent logic
33 // for the Edit Search Engine dialog. 33 // for the Edit Search Engine dialog.
34 class EditSearchEngineController { 34 class EditSearchEngineController {
35 public: 35 public:
36 // An enum to match the AddSearchProvider UMA enum.
Mark P 2015/10/19 21:53:43 please explicitly do = 0, = 1, etc. (except for NU
Evan Stade 2015/10/19 22:55:15 Done. Out of curiosity, what's the reasoning for
Mark P 2015/10/20 19:37:28 Yes, you're right. However in my experience, bein
37 enum EditSearchEngineActions {
38 ADD_SEARCH_PROVIDER_CALLED = 0,
39 CONFIRMATION_DIALOG_SHOWN,
40 CONFIRMATION_DIALOG_CONFIRMED,
41 CONFIRMATION_DIALOG_CANCELLED,
42 NUM_EDIT_SEARCH_ENGINE_ACTIONS
43 };
44
36 // The |template_url| and/or |edit_keyword_delegate| may be NULL. 45 // The |template_url| and/or |edit_keyword_delegate| may be NULL.
37 EditSearchEngineController( 46 EditSearchEngineController(
38 TemplateURL* template_url, 47 TemplateURL* template_url,
39 EditSearchEngineControllerDelegate* edit_keyword_delegate, 48 EditSearchEngineControllerDelegate* edit_keyword_delegate,
40 Profile* profile); 49 Profile* profile);
41 ~EditSearchEngineController() {} 50 ~EditSearchEngineController() {}
42 51
43 // Returns true if the value of |title_input| is a valid search engine name. 52 // Returns true if the value of |title_input| is a valid search engine name.
44 bool IsTitleValid(const base::string16& title_input) const; 53 bool IsTitleValid(const base::string16& title_input) const;
45 54
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // success to add/modify the entry. May be NULL. 90 // success to add/modify the entry. May be NULL.
82 EditSearchEngineControllerDelegate* edit_keyword_delegate_; 91 EditSearchEngineControllerDelegate* edit_keyword_delegate_;
83 92
84 // Profile whose TemplateURLService we're modifying. 93 // Profile whose TemplateURLService we're modifying.
85 Profile* profile_; 94 Profile* profile_;
86 95
87 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineController); 96 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineController);
88 }; 97 };
89 98
90 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_ 99 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698