diff options
author | hashimoto <hashimoto@chromium.org> | 2014-08-25 04:08:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-25 11:09:18 +0000 |
commit | 2d1cf16698ef2680ea50014b015fecf6db32e730 (patch) | |
tree | 9633bde6c0540058db6c59fa184e85c92c77ef33 | |
parent | c921afdcc249a89bd9e8cc1cc898e4c320cc5d03 (diff) | |
download | chromium_src-2d1cf16698ef2680ea50014b015fecf6db32e730.zip chromium_src-2d1cf16698ef2680ea50014b015fecf6db32e730.tar.gz chromium_src-2d1cf16698ef2680ea50014b015fecf6db32e730.tar.bz2 |
Merge apps/pref* to extensions/browser/pref*
The pref's exclusive user AppWindow will move to extensions/browser
Merge apps/pref_names.{cc,h} to extensions/browser/pref_names.{cc,h}
Merge apps/prefs.{cc,h} to extensions/browser/extension_prefs.cc
BUG=403726
Committed: https://chromium.googlesource.com/chromium/src/+/3da4417c5baa6b8fe0be9aa012f0fd3294d9dbc7
Review URL: https://codereview.chromium.org/493003002
Cr-Commit-Position: refs/heads/master@{#291655}
-rw-r--r-- | apps/BUILD.gn | 4 | ||||
-rw-r--r-- | apps/app_window.cc | 4 | ||||
-rw-r--r-- | apps/apps.gypi | 4 | ||||
-rw-r--r-- | apps/pref_names.cc | 17 | ||||
-rw-r--r-- | apps/pref_names.h | 18 | ||||
-rw-r--r-- | apps/prefs.cc | 21 | ||||
-rw-r--r-- | apps/prefs.h | 21 | ||||
-rw-r--r-- | chrome/browser/apps/app_launch_for_metro_restart_win.cc | 1 | ||||
-rw-r--r-- | chrome/browser/policy/configuration_policy_handler_list_factory.cc | 6 | ||||
-rw-r--r-- | chrome/browser/prefs/browser_prefs.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/app_list/app_list_service_impl.cc | 1 | ||||
-rw-r--r-- | extensions/browser/extension_prefs.cc | 6 | ||||
-rw-r--r-- | extensions/browser/pref_names.cc | 1 | ||||
-rw-r--r-- | extensions/browser/pref_names.h | 3 |
14 files changed, 13 insertions, 96 deletions
diff --git a/apps/BUILD.gn b/apps/BUILD.gn index ececd7d..16d4138 100644 --- a/apps/BUILD.gn +++ b/apps/BUILD.gn @@ -32,10 +32,6 @@ static_library("apps") { "launcher.cc", "launcher.h", "metrics_names.h", - "pref_names.cc", - "pref_names.h", - "prefs.cc", - "prefs.h", "saved_files_service.cc", "saved_files_service.h", "saved_files_service_factory.cc", diff --git a/apps/app_window.cc b/apps/app_window.cc index 14bf438..459e4c49 100644 --- a/apps/app_window.cc +++ b/apps/app_window.cc @@ -49,8 +49,8 @@ #include "ui/gfx/screen.h" #if !defined(OS_MACOSX) -#include "apps/pref_names.h" #include "base/prefs/pref_service.h" +#include "extensions/browser/pref_names.h" #endif using content::BrowserContext; @@ -593,7 +593,7 @@ void AppWindow::SetFullscreen(FullscreenType type, bool enable) { PrefService* prefs = extensions::ExtensionsBrowserClient::Get()->GetPrefServiceForContext( browser_context()); - if (!prefs->GetBoolean(prefs::kAppFullscreenAllowed)) + if (!prefs->GetBoolean(extensions::pref_names::kAppFullscreenAllowed)) return; } #endif diff --git a/apps/apps.gypi b/apps/apps.gypi index 608b919..5337780 100644 --- a/apps/apps.gypi +++ b/apps/apps.gypi @@ -51,10 +51,6 @@ 'launcher.cc', 'launcher.h', 'metrics_names.h', - 'pref_names.cc', - 'pref_names.h', - 'prefs.cc', - 'prefs.h', 'saved_files_service.cc', 'saved_files_service.h', 'saved_files_service_factory.cc', diff --git a/apps/pref_names.cc b/apps/pref_names.cc deleted file mode 100644 index ea08c76..0000000 --- a/apps/pref_names.cc +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 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 "apps/pref_names.h" - -namespace apps { - -namespace prefs { - -// A boolean that tracks whether apps are allowed to enter fullscreen mode. -extern const char kAppFullscreenAllowed[] = - "apps.fullscreen.allowed"; - -} // namespace prefs - -} // namespace apps diff --git a/apps/pref_names.h b/apps/pref_names.h deleted file mode 100644 index 764be82..0000000 --- a/apps/pref_names.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 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. - -#ifndef APPS_PREF_NAMES_H_ -#define APPS_PREF_NAMES_H_ - -namespace apps { -namespace prefs { - -// Alphabetical list of preference names specific to Apps component. -// Keep alphabetized and document each one in the source file. -extern const char kAppFullscreenAllowed[]; - -} // namespace prefs -} // namespace apps - -#endif // APPS_PREF_NAMES_H_ diff --git a/apps/prefs.cc b/apps/prefs.cc deleted file mode 100644 index 0521a5c..0000000 --- a/apps/prefs.cc +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 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 "apps/prefs.h" - -#include "apps/pref_names.h" -#include "base/prefs/pref_registry_simple.h" -#include "components/pref_registry/pref_registry_syncable.h" - -namespace apps { - -void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { -#if !defined(OS_MACOSX) - registry->RegisterBooleanPref( - prefs::kAppFullscreenAllowed, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); -#endif -} - -} // namespace apps diff --git a/apps/prefs.h b/apps/prefs.h deleted file mode 100644 index fcccfec..0000000 --- a/apps/prefs.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 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. - -#ifndef APPS_PREFS_H_ -#define APPS_PREFS_H_ - -class PrefRegistrySimple; - -namespace user_prefs { -class PrefRegistrySyncable; -} - -namespace apps { - -// Register per-profile preferences for the apps system. -void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); - -} // namespace apps - -#endif // APPS_PREFS_H_ diff --git a/chrome/browser/apps/app_launch_for_metro_restart_win.cc b/chrome/browser/apps/app_launch_for_metro_restart_win.cc index 2002d78..5522327 100644 --- a/chrome/browser/apps/app_launch_for_metro_restart_win.cc +++ b/chrome/browser/apps/app_launch_for_metro_restart_win.cc @@ -5,7 +5,6 @@ #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" #include "apps/launcher.h" -#include "apps/pref_names.h" #include "base/bind.h" #include "base/files/file_path.h" #include "base/message_loop/message_loop.h" diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index cd582cb..d39735a 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -48,10 +48,6 @@ #include "chrome/browser/download/download_dir_policy_handler.h" #endif -#if !defined(OS_MACOSX) && !defined(OS_IOS) -#include "apps/pref_names.h" -#endif - #if defined(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/api/messaging/native_messaging_policy_handler.h" #include "chrome/browser/extensions/policy_handlers.h" @@ -370,7 +366,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { base::Value::TYPE_BOOLEAN }, #if defined(ENABLE_EXTENSIONS) { key::kFullscreenAllowed, - apps::prefs::kAppFullscreenAllowed, + extensions::pref_names::kAppFullscreenAllowed, base::Value::TYPE_BOOLEAN }, #endif // defined(ENABLE_EXTENSIONS) #endif // !defined(OS_MACOSX) && !defined(OS_IOS) diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 44ff8a8..ee7cabd 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -107,7 +107,6 @@ #endif #if defined(ENABLE_EXTENSIONS) -#include "apps/prefs.h" #include "chrome/browser/extensions/activity_log/activity_log.h" #include "chrome/browser/extensions/api/commands/command_service.h" #include "chrome/browser/extensions/api/tabs/tabs_api.h" @@ -404,7 +403,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { #endif #if defined(ENABLE_EXTENSIONS) - apps::RegisterProfilePrefs(registry); EasyUnlockService::RegisterProfilePrefs(registry); extensions::ActivityLog::RegisterProfilePrefs(registry); extensions::launch_util::RegisterProfilePrefs(registry); diff --git a/chrome/browser/ui/app_list/app_list_service_impl.cc b/chrome/browser/ui/app_list/app_list_service_impl.cc index cd59dea..6515d71 100644 --- a/chrome/browser/ui/app_list/app_list_service_impl.cc +++ b/chrome/browser/ui/app_list/app_list_service_impl.cc @@ -6,7 +6,6 @@ #include <string> -#include "apps/pref_names.h" #include "base/bind.h" #include "base/command_line.h" #include "base/metrics/histogram.h" diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index aa7fd59..864a4f9 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc @@ -1995,6 +1995,12 @@ void ExtensionPrefs::RegisterProfilePrefs( kCorruptedDisableCount, 0, // default value user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + +#if !defined(OS_MACOSX) + registry->RegisterBooleanPref( + pref_names::kAppFullscreenAllowed, true, + user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); +#endif } template <class ExtensionIdContainer> diff --git a/extensions/browser/pref_names.cc b/extensions/browser/pref_names.cc index f08b689..94b386c 100644 --- a/extensions/browser/pref_names.cc +++ b/extensions/browser/pref_names.cc @@ -30,6 +30,7 @@ bool ScopeToPrefName(ExtensionPrefsScope scope, std::string* result) { const char kAlertsInitialized[] = "extensions.alerts.initialized"; const char kAllowedInstallSites[] = "extensions.allowed_install_sites"; const char kAllowedTypes[] = "extensions.allowed_types"; +const char kAppFullscreenAllowed[] = "apps.fullscreen.allowed"; const char kBookmarkAppCreationLaunchType[] = "extensions.bookmark_app_creation_launch_type"; const char kExtensions[] = "extensions.settings"; diff --git a/extensions/browser/pref_names.h b/extensions/browser/pref_names.h index 20f39f7..e552455 100644 --- a/extensions/browser/pref_names.h +++ b/extensions/browser/pref_names.h @@ -36,6 +36,9 @@ extern const char kAllowedInstallSites[]; // kInstallForceList. extern const char kAllowedTypes[]; +// A boolean that tracks whether apps are allowed to enter fullscreen mode. +extern const char kAppFullscreenAllowed[]; + // Integer which specifies the launch type that bookmark apps are created with // by default. extern const char kBookmarkAppCreationLaunchType[]; |