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

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

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 static bool OverrideFunction(const std::string& name, 71 static bool OverrideFunction(const std::string& name,
72 ExtensionFunctionFactory factory); 72 ExtensionFunctionFactory factory);
73 73
74 // Resets all functions to their initial implementation. 74 // Resets all functions to their initial implementation.
75 static void ResetFunctions(); 75 static void ResetFunctions();
76 76
77 // Dispatches an IO-thread extension function. Only used for specific 77 // Dispatches an IO-thread extension function. Only used for specific
78 // functions that must be handled on the IO-thread. 78 // functions that must be handled on the IO-thread.
79 static void DispatchOnIOThread( 79 static void DispatchOnIOThread(
80 const ExtensionInfoMap* extension_info_map, 80 const ExtensionInfoMap* extension_info_map,
81 ProfileId profile_id, 81 void* profile,
82 int render_process_id, 82 int render_process_id,
83 base::WeakPtr<ChromeRenderMessageFilter> ipc_sender, 83 base::WeakPtr<ChromeRenderMessageFilter> ipc_sender,
84 int routing_id, 84 int routing_id,
85 const ExtensionHostMsg_Request_Params& params); 85 const ExtensionHostMsg_Request_Params& params);
86 86
87 // Public constructor. Callers must ensure that: 87 // Public constructor. Callers must ensure that:
88 // - |delegate| outlives this object. 88 // - |delegate| outlives this object.
89 // - This object outlives any RenderViewHost's passed to created 89 // - This object outlives any RenderViewHost's passed to created
90 // ExtensionFunctions. 90 // ExtensionFunctions.
91 ExtensionFunctionDispatcher(Profile* profile, Delegate* delegate); 91 ExtensionFunctionDispatcher(Profile* profile, Delegate* delegate);
(...skipping 18 matching lines...) Expand all
110 // The profile that this dispatcher is associated with. 110 // The profile that this dispatcher is associated with.
111 Profile* profile() { return profile_; } 111 Profile* profile() { return profile_; }
112 112
113 private: 113 private:
114 // Helper to create an ExtensionFunction to handle the function given by 114 // Helper to create an ExtensionFunction to handle the function given by
115 // |params|. Can be called on any thread. 115 // |params|. Can be called on any thread.
116 // Does not set subclass properties, or include_incognito. 116 // Does not set subclass properties, or include_incognito.
117 static ExtensionFunction* CreateExtensionFunction( 117 static ExtensionFunction* CreateExtensionFunction(
118 const ExtensionHostMsg_Request_Params& params, 118 const ExtensionHostMsg_Request_Params& params,
119 const Extension* extension, 119 const Extension* extension,
120 ProfileId profile_id, 120 void* profile,
121 int render_process_id, 121 int render_process_id,
122 IPC::Message::Sender* ipc_sender, 122 IPC::Message::Sender* ipc_sender,
123 int routing_id); 123 int routing_id);
124 124
125 // Helper to send an access denied error to the requesting renderer. Can be 125 // Helper to send an access denied error to the requesting renderer. Can be
126 // called on any thread. 126 // called on any thread.
127 static void SendAccessDenied(IPC::Message::Sender* ipc_sender, 127 static void SendAccessDenied(IPC::Message::Sender* ipc_sender,
128 int routing_id, 128 int routing_id,
129 int request_id); 129 int request_id);
130 130
131 Profile* profile_; 131 Profile* profile_;
132 132
133 Delegate* delegate_; 133 Delegate* delegate_;
134 }; 134 };
135 135
136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698