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

Side by Side Diff: chrome/browser/extensions/extension_with_management_policy_apitest.h

Issue 2499493004: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: -Added includes, Seperated setting usage of default policy in PermissionsData, spelling fixes 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "chrome/browser/extensions/extension_apitest.h"
12 #include "components/policy/core/common/mock_configuration_policy_provider.h"
13
14 // The ExtensionSettings policy affects host permissions which impacts several
15 // API integration tests. This class enables easy declaration of
16 // ExtensionSettings policies and functions commonly used during these tests.
17 class ExtensionApiTestWithManagementPolicy : public ExtensionApiTest {
18 public:
19 ExtensionApiTestWithManagementPolicy();
20 ~ExtensionApiTestWithManagementPolicy() override;
21 void SetUpInProcessBrowserTestFixture() override;
22
23 protected:
24 void MonitorRequestHandler(const net::test_server::HttpRequest& request);
25 bool BrowsedTo(const char* test_host);
26 void ClearRequestLog();
27 policy::MockConfigurationPolicyProvider policy_provider_;
28
29 private:
30 struct ManagementPolicyRequestLog {
31 std::string all_headers;
32 std::string host;
33 };
34 std::vector<ManagementPolicyRequestLog> request_log_;
35
36 DISALLOW_COPY_AND_ASSIGN(ExtensionApiTestWithManagementPolicy);
37 };
38
39 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698