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

Unified Diff: chrome/common/extensions/manifest_handlers/kiosk_enabled_info.cc

Issue 23604068: Add "kiosk_only" manifest attribute for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed .crx binary Created 7 years, 3 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/common/extensions/manifest_handlers/kiosk_enabled_info.cc
diff --git a/chrome/common/extensions/manifest_handlers/kiosk_enabled_info.cc b/chrome/common/extensions/manifest_handlers/kiosk_enabled_info.cc
deleted file mode 100644
index 4c50de5fc4dcf2ee5019e4238688d9ff48c50092..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/manifest_handlers/kiosk_enabled_info.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2013 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/common/extensions/manifest_handlers/kiosk_enabled_info.h"
-
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string16.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/values.h"
-#include "extensions/common/manifest_constants.h"
-
-namespace extensions {
-
-namespace keys = manifest_keys;
-
-KioskEnabledInfo::KioskEnabledInfo(bool is_kiosk_enabled)
- : kiosk_enabled(is_kiosk_enabled) {
-}
-
-KioskEnabledInfo::~KioskEnabledInfo() {
-}
-
-// static
-bool KioskEnabledInfo::IsKioskEnabled(const Extension* extension) {
- KioskEnabledInfo* info = static_cast<KioskEnabledInfo*>(
- extension->GetManifestData(keys::kKioskEnabled));
- return info ? info->kiosk_enabled : false;
-}
-
-KioskEnabledHandler::KioskEnabledHandler() {
-}
-
-KioskEnabledHandler::~KioskEnabledHandler() {
-}
-
-bool KioskEnabledHandler::Parse(Extension* extension, string16* error) {
- DCHECK(extension->manifest()->HasKey(keys::kKioskEnabled));
-
- bool kiosk_enabled = false;
- if (!extension->manifest()->GetBoolean(keys::kKioskEnabled, &kiosk_enabled)) {
- *error = ASCIIToUTF16(manifest_errors::kInvalidKioskEnabled);
- return false;
- }
-
- // All other use cases should be already filtered out by manifest feature
- // checks.
- DCHECK(extension->is_platform_app());
-
- extension->SetManifestData(keys::kKioskEnabled,
- new KioskEnabledInfo(kiosk_enabled));
- return true;
-}
-
-const std::vector<std::string> KioskEnabledHandler::Keys() const {
- return SingleKey(keys::kKioskEnabled);
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698