blob: 84c37899f6deda50345e2460189e4e6de2adfe77 [file] [log] [blame]
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_module.h"
#include <string>
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/profile.h"
ExtensionPrefs* SetUpdateUrlDataFunction::extension_prefs() {
return profile()->GetExtensionsService()->extension_prefs();
}
bool SetUpdateUrlDataFunction::RunImpl() {
std::string data;
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data));
extension_prefs()->SetUpdateUrlData(extension_id(), data);
return true;
}