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

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: mpearson review 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
« no previous file with comments | « no previous file | chrome/browser/ui/search_engines/edit_search_engine_controller.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_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. Values should not be
37 // changed; new ones must be added at the bottom.
38 enum EditSearchEngineActions {
39 ADD_SEARCH_PROVIDER_CALLED = 0,
40 CONFIRMATION_DIALOG_SHOWN = 1,
41 CONFIRMATION_DIALOG_CONFIRMED = 2,
42 CONFIRMATION_DIALOG_CANCELLED = 3,
43 NUM_EDIT_SEARCH_ENGINE_ACTIONS
44 };
45
36 // The |template_url| and/or |edit_keyword_delegate| may be NULL. 46 // The |template_url| and/or |edit_keyword_delegate| may be NULL.
37 EditSearchEngineController( 47 EditSearchEngineController(
38 TemplateURL* template_url, 48 TemplateURL* template_url,
39 EditSearchEngineControllerDelegate* edit_keyword_delegate, 49 EditSearchEngineControllerDelegate* edit_keyword_delegate,
40 Profile* profile); 50 Profile* profile);
41 ~EditSearchEngineController() {} 51 ~EditSearchEngineController() {}
42 52
43 // Returns true if the value of |title_input| is a valid search engine name. 53 // Returns true if the value of |title_input| is a valid search engine name.
44 bool IsTitleValid(const base::string16& title_input) const; 54 bool IsTitleValid(const base::string16& title_input) const;
45 55
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // success to add/modify the entry. May be NULL. 91 // success to add/modify the entry. May be NULL.
82 EditSearchEngineControllerDelegate* edit_keyword_delegate_; 92 EditSearchEngineControllerDelegate* edit_keyword_delegate_;
83 93
84 // Profile whose TemplateURLService we're modifying. 94 // Profile whose TemplateURLService we're modifying.
85 Profile* profile_; 95 Profile* profile_;
86 96
87 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineController); 97 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineController);
88 }; 98 };
89 99
90 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_ 100 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_EDIT_SEARCH_ENGINE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/search_engines/edit_search_engine_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698