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

Side by Side Diff: extensions/browser/extension_function.cc

Issue 1060993003: [Extensions UI] Use developerPrivate API for profile configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/browser/extension_function.h" 5 #include "extensions/browser/extension_function.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "content/public/browser/notification_source.h" 10 #include "content/public/browser/notification_source.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 300
301 ExtensionFunction::ResponseValue ExtensionFunction::OneArgument( 301 ExtensionFunction::ResponseValue ExtensionFunction::OneArgument(
302 base::Value* arg) { 302 base::Value* arg) {
303 scoped_ptr<base::ListValue> args(new base::ListValue()); 303 scoped_ptr<base::ListValue> args(new base::ListValue());
304 args->Append(arg); 304 args->Append(arg);
305 return ResponseValue( 305 return ResponseValue(
306 new ArgumentListResponseValue(name(), "OneArgument", this, args.Pass())); 306 new ArgumentListResponseValue(name(), "OneArgument", this, args.Pass()));
307 } 307 }
308 308
309 ExtensionFunction::ResponseValue ExtensionFunction::OneArgument(
310 scoped_ptr<base::Value> arg) {
311 return OneArgument(arg.release());
312 }
313
309 ExtensionFunction::ResponseValue ExtensionFunction::TwoArguments( 314 ExtensionFunction::ResponseValue ExtensionFunction::TwoArguments(
310 base::Value* arg1, 315 base::Value* arg1,
311 base::Value* arg2) { 316 base::Value* arg2) {
312 scoped_ptr<base::ListValue> args(new base::ListValue()); 317 scoped_ptr<base::ListValue> args(new base::ListValue());
313 args->Append(arg1); 318 args->Append(arg1);
314 args->Append(arg2); 319 args->Append(arg2);
315 return ResponseValue( 320 return ResponseValue(
316 new ArgumentListResponseValue(name(), "TwoArguments", this, args.Pass())); 321 new ArgumentListResponseValue(name(), "TwoArguments", this, args.Pass()));
317 } 322 }
318 323
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 575
571 ExtensionFunction::ResponseAction SyncIOThreadExtensionFunction::Run() { 576 ExtensionFunction::ResponseAction SyncIOThreadExtensionFunction::Run() {
572 return RespondNow(RunSync() ? ArgumentList(results_.Pass()) : Error(error_)); 577 return RespondNow(RunSync() ? ArgumentList(results_.Pass()) : Error(error_));
573 } 578 }
574 579
575 // static 580 // static
576 bool SyncIOThreadExtensionFunction::ValidationFailure( 581 bool SyncIOThreadExtensionFunction::ValidationFailure(
577 SyncIOThreadExtensionFunction* function) { 582 SyncIOThreadExtensionFunction* function) {
578 return false; 583 return false;
579 } 584 }
OLDNEW
« no previous file with comments | « extensions/browser/extension_function.h ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698