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

Unified Diff: chrome/browser/chromeos/extensions/echo_private_api.cc

Issue 12089062: Move API functions registrations out of ExtensionFunctionRegistry. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/echo_private_api.cc
===================================================================
--- chrome/browser/chromeos/extensions/echo_private_api.cc (revision 181773)
+++ chrome/browser/chromeos/extensions/echo_private_api.cc (working copy)
@@ -21,16 +21,17 @@
using content::BrowserThread;
-GetRegistrationCodeFunction::GetRegistrationCodeFunction() {
-}
+EchoPrivateGetRegistrationCodeFunction::
+ EchoPrivateGetRegistrationCodeFunction() {}
-GetRegistrationCodeFunction::~GetRegistrationCodeFunction() {
-}
+EchoPrivateGetRegistrationCodeFunction::
+ ~EchoPrivateGetRegistrationCodeFunction() {}
-void GetRegistrationCodeFunction::GetRegistrationCode(const std::string& type) {
+void EchoPrivateGetRegistrationCodeFunction::GetRegistrationCode(
+ const std::string& type) {
if (!chromeos::KioskModeSettings::Get()->is_initialized()) {
chromeos::KioskModeSettings::Get()->Initialize(base::Bind(
- &GetRegistrationCodeFunction::GetRegistrationCode,
+ &EchoPrivateGetRegistrationCodeFunction::GetRegistrationCode,
base::Unretained(this),
type));
return;
@@ -56,26 +57,27 @@
SendResponse(true);
}
-bool GetRegistrationCodeFunction::RunImpl() {
+bool EchoPrivateGetRegistrationCodeFunction::RunImpl() {
std::string type;
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &type));
GetRegistrationCode(type);
return true;
}
-GetOobeTimestampFunction::GetOobeTimestampFunction() {
+EchoPrivateGetOobeTimestampFunction::EchoPrivateGetOobeTimestampFunction() {
}
-GetOobeTimestampFunction::~GetOobeTimestampFunction() {
+EchoPrivateGetOobeTimestampFunction::~EchoPrivateGetOobeTimestampFunction() {
}
-bool GetOobeTimestampFunction::RunImpl() {
+bool EchoPrivateGetOobeTimestampFunction::RunImpl() {
BrowserThread::PostTaskAndReplyWithResult(
BrowserThread::FILE, FROM_HERE,
base::Bind(
- &GetOobeTimestampFunction::GetOobeTimestampOnFileThread, this),
+ &EchoPrivateGetOobeTimestampFunction::GetOobeTimestampOnFileThread,
+ this),
base::Bind(
- &GetOobeTimestampFunction::SendResponse, this));
+ &EchoPrivateGetOobeTimestampFunction::SendResponse, this));
return true;
}
@@ -83,7 +85,7 @@
// The timestamp is used to determine when the user first activates the device.
// If we can get the timestamp info, return it as yyyy-mm-dd, otherwise, return
// an empty string.
-bool GetOobeTimestampFunction::GetOobeTimestampOnFileThread() {
+bool EchoPrivateGetOobeTimestampFunction::GetOobeTimestampOnFileThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
const char kOobeTimestampFile[] = "/home/chronos/.oobe_completed";
@@ -101,16 +103,19 @@
return true;
}
-CheckAllowRedeemOffersFunction::CheckAllowRedeemOffersFunction() {
+EchoPrivateCheckAllowRedeemOffersFunction::
+ EchoPrivateCheckAllowRedeemOffersFunction() {
}
-CheckAllowRedeemOffersFunction::~CheckAllowRedeemOffersFunction() {
+EchoPrivateCheckAllowRedeemOffersFunction::
+ ~EchoPrivateCheckAllowRedeemOffersFunction() {
}
-void CheckAllowRedeemOffersFunction::CheckAllowRedeemOffers() {
+void EchoPrivateCheckAllowRedeemOffersFunction::CheckAllowRedeemOffers() {
chromeos::CrosSettingsProvider::TrustedStatus status =
chromeos::CrosSettings::Get()->PrepareTrustedValues(
- base::Bind(&CheckAllowRedeemOffersFunction::CheckAllowRedeemOffers,
+ base::Bind(&EchoPrivateCheckAllowRedeemOffersFunction::
+ CheckAllowRedeemOffers,
base::Unretained(this)));
if (status == chromeos::CrosSettingsProvider::TEMPORARILY_UNTRUSTED)
return;
@@ -127,7 +132,7 @@
// Check the enterprise policy kAllowRedeemChromeOsRegistrationOffers flag
// value. This policy is used to control whether user can redeem offers using
// enterprise device.
-bool CheckAllowRedeemOffersFunction::RunImpl() {
+bool EchoPrivateCheckAllowRedeemOffersFunction::RunImpl() {
CheckAllowRedeemOffers();
return true;
}
« no previous file with comments | « chrome/browser/chromeos/extensions/echo_private_api.h ('k') | chrome/browser/chromeos/extensions/info_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698