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

Side by Side Diff: chrome/browser/extensions/api/power/power_api.cc

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/extensions/api/power/power_api.h" 5 #include "chrome/browser/extensions/api/power/power_api.h"
6 6
7 #include "chrome/browser/extensions/api/power/power_api_manager.h" 7 #include "chrome/browser/extensions/api/power/power_api_manager.h"
8 #include "chrome/common/extensions/api/power.h" 8 #include "chrome/common/extensions/api/power.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 bool PowerRequestKeepAwakeFunction::RunImpl() { 12 bool PowerRequestKeepAwakeFunction::RunSync() {
13 scoped_ptr<api::power::RequestKeepAwake::Params> params( 13 scoped_ptr<api::power::RequestKeepAwake::Params> params(
14 api::power::RequestKeepAwake::Params::Create(*args_)); 14 api::power::RequestKeepAwake::Params::Create(*args_));
15 EXTENSION_FUNCTION_VALIDATE(params); 15 EXTENSION_FUNCTION_VALIDATE(params);
16 EXTENSION_FUNCTION_VALIDATE(params->level != api::power::LEVEL_NONE); 16 EXTENSION_FUNCTION_VALIDATE(params->level != api::power::LEVEL_NONE);
17 PowerApiManager::GetInstance()->AddRequest(extension_id(), params->level); 17 PowerApiManager::GetInstance()->AddRequest(extension_id(), params->level);
18 return true; 18 return true;
19 } 19 }
20 20
21 bool PowerReleaseKeepAwakeFunction::RunImpl() { 21 bool PowerReleaseKeepAwakeFunction::RunSync() {
22 PowerApiManager::GetInstance()->RemoveRequest(extension_id()); 22 PowerApiManager::GetInstance()->RemoveRequest(extension_id());
23 return true; 23 return true;
24 } 24 }
25 25
26 } // namespace extensions 26 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698