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

Side by Side Diff: extensions/renderer/dispatcher.h

Issue 2241203003: Pass user session type to extension feature checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out some stuff Created 4 years, 4 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 EXTENSIONS_RENDERER_DISPATCHER_H_ 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_
6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 const std::string& extension_id, 195 const std::string& extension_id,
196 const URLPatternSet& new_hosts, 196 const URLPatternSet& new_hosts,
197 bool update_origin_whitelist, 197 bool update_origin_whitelist,
198 int tab_id); 198 int tab_id);
199 void OnClearTabSpecificPermissions( 199 void OnClearTabSpecificPermissions(
200 const std::vector<std::string>& extension_ids, 200 const std::vector<std::string>& extension_ids,
201 bool update_origin_whitelist, 201 bool update_origin_whitelist,
202 int tab_id); 202 int tab_id);
203 void OnUsingWebRequestAPI(bool webrequest_used); 203 void OnUsingWebRequestAPI(bool webrequest_used);
204 void OnSetActivityLoggingEnabled(bool enabled); 204 void OnSetActivityLoggingEnabled(bool enabled);
205 void OnSetUserSessionType(Feature::SessionType session_type);
205 206
206 // UserScriptSetManager::Observer implementation. 207 // UserScriptSetManager::Observer implementation.
207 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts) override; 208 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts) override;
208 209
209 void UpdateActiveExtensions(); 210 void UpdateActiveExtensions();
210 211
211 // Sets up the host permissions for |extension|. 212 // Sets up the host permissions for |extension|.
212 void InitOriginPermissions(const Extension* extension); 213 void InitOriginPermissions(const Extension* extension);
213 214
214 // Updates the host permissions for the extension url to include only those in 215 // Updates the host permissions for the extension url to include only those in
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // the observer is destroyed before the UserScriptSet. 308 // the observer is destroyed before the UserScriptSet.
308 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> 309 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer>
309 user_script_set_manager_observer_; 310 user_script_set_manager_observer_;
310 311
311 // Status of webrequest usage. 312 // Status of webrequest usage.
312 bool webrequest_used_; 313 bool webrequest_used_;
313 314
314 // Whether or not extension activity is enabled. 315 // Whether or not extension activity is enabled.
315 bool activity_logging_enabled_; 316 bool activity_logging_enabled_;
316 317
318 // The session type in which the process is running. The session type depends
319 // on the type of user which is logged the session (e.g. kiosk app, regular
320 // user).
321 Feature::SessionType session_type_;
322
317 // The WebView partition ID associated with this process's storage partition, 323 // The WebView partition ID associated with this process's storage partition,
318 // if this renderer is a WebView guest render process. Otherwise, this will be 324 // if this renderer is a WebView guest render process. Otherwise, this will be
319 // empty. 325 // empty.
320 std::string webview_partition_id_; 326 std::string webview_partition_id_;
321 327
322 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 328 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
323 }; 329 };
324 330
325 } // namespace extensions 331 } // namespace extensions
326 332
327 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ 333 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698