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

Side by Side Diff: chrome/browser/ui/webui/settings/site_settings_handler.h

Issue 1845253002: Add unit test for Site Settings Handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 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 | « no previous file | chrome/browser/ui/webui/settings/site_settings_handler_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SETTINGS_SITE_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void OnGetUsageInfo(const storage::UsageInfoEntries& entries); 34 void OnGetUsageInfo(const storage::UsageInfoEntries& entries);
35 void OnUsageInfoCleared(storage::QuotaStatusCode code); 35 void OnUsageInfoCleared(storage::QuotaStatusCode code);
36 36
37 // content_settings::Observer: 37 // content_settings::Observer:
38 void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, 38 void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern,
39 const ContentSettingsPattern& secondary_pattern, 39 const ContentSettingsPattern& secondary_pattern,
40 ContentSettingsType content_type, 40 ContentSettingsType content_type,
41 std::string resource_identifier) override; 41 std::string resource_identifier) override;
42 private: 42 private:
43 FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, GetAndSetDefault);
44 FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Origins);
45
43 // Asynchronously fetches the usage for a given origin. Replies back with 46 // Asynchronously fetches the usage for a given origin. Replies back with
44 // OnGetUsageInfo above. 47 // OnGetUsageInfo above.
45 void HandleFetchUsageTotal(const base::ListValue* args); 48 void HandleFetchUsageTotal(const base::ListValue* args);
46 49
47 // Deletes the storage being used for a given host. 50 // Deletes the storage being used for a given host.
48 void HandleClearUsage(const base::ListValue* args); 51 void HandleClearUsage(const base::ListValue* args);
49 52
50 // Gets and sets the default value for a particular content settings type. 53 // Gets and sets the default value for a particular content settings type.
51 void HandleSetDefaultValueForContentType(const base::ListValue* args); 54 void HandleSetDefaultValueForContentType(const base::ListValue* args);
52 void HandleGetDefaultValueForContentType(const base::ListValue* args); 55 void HandleGetDefaultValueForContentType(const base::ListValue* args);
(...skipping 15 matching lines...) Expand all
68 71
69 // Change observer for content settings. 72 // Change observer for content settings.
70 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; 73 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;
71 74
72 DISALLOW_COPY_AND_ASSIGN(SiteSettingsHandler); 75 DISALLOW_COPY_AND_ASSIGN(SiteSettingsHandler);
73 }; 76 };
74 77
75 } // namespace settings 78 } // namespace settings
76 79
77 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_ 80 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698