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

Side by Side Diff: chrome/browser/ui/webui/md_history_ui.h

Issue 2511993002: Migrate md history test code to ScopedFeatureList. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_WEBUI_MD_HISTORY_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_MD_HISTORY_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_MD_HISTORY_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_MD_HISTORY_UI_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/browser/web_ui_controller.h" 10 #include "content/public/browser/web_ui_controller.h"
(...skipping 11 matching lines...) Expand all
22 class PrefRegistrySyncable; 22 class PrefRegistrySyncable;
23 } 23 }
24 24
25 class MdHistoryUI : public content::WebUIController { 25 class MdHistoryUI : public content::WebUIController {
26 public: 26 public:
27 explicit MdHistoryUI(content::WebUI* web_ui); 27 explicit MdHistoryUI(content::WebUI* web_ui);
28 ~MdHistoryUI() override; 28 ~MdHistoryUI() override;
29 29
30 static bool IsEnabled(Profile* profile); 30 static bool IsEnabled(Profile* profile);
31 31
32 // Reset the current list of features and explicitly set MD History enabled.
33 static void SetEnabledForTesting(bool enabled);
34
35 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 32 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
36 33
37 static base::RefCountedMemory* GetFaviconResourceBytes( 34 static base::RefCountedMemory* GetFaviconResourceBytes(
38 ui::ScaleFactor scale_factor); 35 ui::ScaleFactor scale_factor);
39 36
40 private: 37 private:
41 FRIEND_TEST_ALL_PREFIXES(ContinueWhereILeftOffTest, MDHistoryUpgrade); 38 FRIEND_TEST_ALL_PREFIXES(ContinueWhereILeftOffTest, MDHistoryUpgrade);
42 39
43 static bool use_test_title_; 40 static bool use_test_title_;
44 41
45 void CreateDataSource(); 42 void CreateDataSource();
46 43
47 // Handler for the "menuPromoShown" message from the page. No arguments. 44 // Handler for the "menuPromoShown" message from the page. No arguments.
48 void HandleMenuPromoShown(const base::ListValue* args); 45 void HandleMenuPromoShown(const base::ListValue* args);
49 46
50 DISALLOW_COPY_AND_ASSIGN(MdHistoryUI); 47 DISALLOW_COPY_AND_ASSIGN(MdHistoryUI);
51 }; 48 };
52 49
53 #endif // CHROME_BROWSER_UI_WEBUI_MD_HISTORY_UI_H_ 50 #endif // CHROME_BROWSER_UI_WEBUI_MD_HISTORY_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/log_web_ui_url_browsertest.cc ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698