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

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

Issue 160064: Push bookmarks.remove/removeAll polymorphism into c++. fix bookmarks id schema issues (Closed)
Patch Set: presubmit Created 11 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
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/common/common_resources.grd » ('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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/extensions/extension_function_dispatcher.h" 5 #include "chrome/browser/extensions/extension_function_dispatcher.h"
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/singleton.h" 8 #include "base/singleton.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_bookmarks_module.h" 10 #include "chrome/browser/extensions/extension_bookmarks_module.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } else { 144 } else {
145 iter->second = factory; 145 iter->second = factory;
146 return true; 146 return true;
147 } 147 }
148 } 148 }
149 149
150 ExtensionFunction* FactoryRegistry::NewFunction(const std::string& name) { 150 ExtensionFunction* FactoryRegistry::NewFunction(const std::string& name) {
151 FactoryMap::iterator iter = factories_.find(name); 151 FactoryMap::iterator iter = factories_.find(name);
152 DCHECK(iter != factories_.end()); 152 DCHECK(iter != factories_.end());
153 ExtensionFunction* function = iter->second(); 153 ExtensionFunction* function = iter->second();
154 function->SetName(name); 154 function->set_name(name);
155 return function; 155 return function;
156 } 156 }
157 157
158 }; // namespace 158 }; // namespace
159 159
160 // ExtensionFunctionDispatcher ------------------------------------------------- 160 // ExtensionFunctionDispatcher -------------------------------------------------
161 161
162 void ExtensionFunctionDispatcher::GetAllFunctionNames( 162 void ExtensionFunctionDispatcher::GetAllFunctionNames(
163 std::vector<std::string>* names) { 163 std::vector<std::string>* names) {
164 FactoryRegistry::instance()->GetAllNames(names); 164 FactoryRegistry::instance()->GetAllNames(names);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } else { 235 } else {
236 NOTREACHED(); 236 NOTREACHED();
237 base::KillProcess(render_view_host_->process()->process().handle(), 237 base::KillProcess(render_view_host_->process()->process().handle(),
238 ResultCodes::KILLED_BAD_MESSAGE, false); 238 ResultCodes::KILLED_BAD_MESSAGE, false);
239 } 239 }
240 } 240 }
241 241
242 Profile* ExtensionFunctionDispatcher::profile() { 242 Profile* ExtensionFunctionDispatcher::profile() {
243 return render_view_host_->process()->profile(); 243 return render_view_host_->process()->profile();
244 } 244 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/common/common_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698