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

Side by Side Diff: chrome/browser/supervised_user/legacy/permission_request_creator_sync.h

Issue 2354613002: [Sync] Fix namespaces for the browser_sync component. (Closed)
Patch Set: Address comments. Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SUPERVISED_USER_LEGACY_PERMISSION_REQUEST_CREATOR_SYNC_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_LEGACY_PERMISSION_REQUEST_CREATOR_SYNC_H_
6 #define CHROME_BROWSER_SUPERVISED_USER_LEGACY_PERMISSION_REQUEST_CREATOR_SYNC_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_LEGACY_PERMISSION_REQUEST_CREATOR_SYNC_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/supervised_user/permission_request_creator.h" 11 #include "chrome/browser/supervised_user/permission_request_creator.h"
12 12
13 class ProfileSyncService;
14 class SupervisedUserSettingsService; 13 class SupervisedUserSettingsService;
15 class SupervisedUserSharedSettingsService; 14 class SupervisedUserSharedSettingsService;
16 15
16 namespace browser_sync {
17 class ProfileSyncService;
18 } // namespace browser_sync
19
17 // The requests are stored using a prefix followed by a URIEncoded version of 20 // The requests are stored using a prefix followed by a URIEncoded version of
18 // the URL/extension ID. Each entry contains a dictionary which currently has 21 // the URL/extension ID. Each entry contains a dictionary which currently has
19 // the timestamp of the request in it. 22 // the timestamp of the request in it.
20 class PermissionRequestCreatorSync : public PermissionRequestCreator { 23 class PermissionRequestCreatorSync : public PermissionRequestCreator {
21 public: 24 public:
22 PermissionRequestCreatorSync( 25 PermissionRequestCreatorSync(
23 SupervisedUserSettingsService* settings_service, 26 SupervisedUserSettingsService* settings_service,
24 SupervisedUserSharedSettingsService* shared_settings_service, 27 SupervisedUserSharedSettingsService* shared_settings_service,
25 ProfileSyncService* sync_service, 28 browser_sync::ProfileSyncService* sync_service,
26 const std::string& name, 29 const std::string& name,
27 const std::string& supervised_user_id); 30 const std::string& supervised_user_id);
28 ~PermissionRequestCreatorSync() override; 31 ~PermissionRequestCreatorSync() override;
29 32
30 // PermissionRequestCreator implementation: 33 // PermissionRequestCreator implementation:
31 bool IsEnabled() const override; 34 bool IsEnabled() const override;
32 void CreateURLAccessRequest(const GURL& url_requested, 35 void CreateURLAccessRequest(const GURL& url_requested,
33 const SuccessCallback& callback) override; 36 const SuccessCallback& callback) override;
34 void CreateExtensionInstallRequest(const std::string& id, 37 void CreateExtensionInstallRequest(const std::string& id,
35 const SuccessCallback& callback) override; 38 const SuccessCallback& callback) override;
36 void CreateExtensionUpdateRequest(const std::string& id, 39 void CreateExtensionUpdateRequest(const std::string& id,
37 const SuccessCallback& callback) override; 40 const SuccessCallback& callback) override;
38 41
39 private: 42 private:
40 // Note: Doesn't escape |data|. If you need it escaped, do it yourself! 43 // Note: Doesn't escape |data|. If you need it escaped, do it yourself!
41 void CreateRequest(const std::string& prefix, 44 void CreateRequest(const std::string& prefix,
42 const std::string& data, 45 const std::string& data,
43 const SuccessCallback& callback); 46 const SuccessCallback& callback);
44 SupervisedUserSettingsService* settings_service_; 47 SupervisedUserSettingsService* settings_service_;
45 SupervisedUserSharedSettingsService* shared_settings_service_; 48 SupervisedUserSharedSettingsService* shared_settings_service_;
46 ProfileSyncService* sync_service_; 49 browser_sync::ProfileSyncService* sync_service_;
47 std::string name_; 50 std::string name_;
48 std::string supervised_user_id_; 51 std::string supervised_user_id_;
49 }; 52 };
50 53
51 #endif // CHROME_BROWSER_SUPERVISED_USER_LEGACY_PERMISSION_REQUEST_CREATOR_SYNC _H_ 54 #endif // CHROME_BROWSER_SUPERVISED_USER_LEGACY_PERMISSION_REQUEST_CREATOR_SYNC _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698