| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/webui/extensions/chromeos/kiosk_apps_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/chromeos/login/user_manager.h" | 17 #include "chrome/browser/chromeos/login/user_manager.h" |
| 18 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 19 #include "chrome/common/extensions/extension.h" | 19 #include "chrome/common/extensions/extension.h" |
| 20 #include "chrome/common/extensions/extension_constants.h" | |
| 21 #include "chromeos/chromeos_switches.h" | 20 #include "chromeos/chromeos_switches.h" |
| 22 #include "chromeos/settings/cros_settings_names.h" | 21 #include "chromeos/settings/cros_settings_names.h" |
| 23 #include "content/public/browser/web_ui.h" | 22 #include "content/public/browser/web_ui.h" |
| 24 #include "content/public/browser/web_ui_data_source.h" | 23 #include "content/public/browser/web_ui_data_source.h" |
| 24 #include "extensions/common/extension_urls.h" |
| 25 #include "grit/chromium_strings.h" | 25 #include "grit/chromium_strings.h" |
| 26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "ui/base/webui/web_ui_util.h" | 28 #include "ui/base/webui/web_ui_util.h" |
| 29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 30 | 30 |
| 31 namespace chromeos { | 31 namespace chromeos { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 59 if (extensions::Extension::IdIsValid(input)) { | 59 if (extensions::Extension::IdIsValid(input)) { |
| 60 *app_id = input; | 60 *app_id = input; |
| 61 return true; | 61 return true; |
| 62 } | 62 } |
| 63 | 63 |
| 64 GURL webstore_url = GURL(input); | 64 GURL webstore_url = GURL(input); |
| 65 if (!webstore_url.is_valid()) | 65 if (!webstore_url.is_valid()) |
| 66 return false; | 66 return false; |
| 67 | 67 |
| 68 GURL webstore_base_url = | 68 GURL webstore_base_url = |
| 69 GURL(extension_urls::GetWebstoreItemDetailURLPrefix()); | 69 GURL(extensions::GetWebstoreItemDetailURLPrefix()); |
| 70 | 70 |
| 71 if (webstore_url.scheme() != webstore_base_url.scheme() || | 71 if (webstore_url.scheme() != webstore_base_url.scheme() || |
| 72 webstore_url.host() != webstore_base_url.host() || | 72 webstore_url.host() != webstore_base_url.host() || |
| 73 !StartsWithASCII( | 73 !StartsWithASCII( |
| 74 webstore_url.path(), webstore_base_url.path(), true)) { | 74 webstore_url.path(), webstore_base_url.path(), true)) { |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 const std::string path = webstore_url.path(); | 78 const std::string path = webstore_url.path(); |
| 79 const size_t last_slash = path.rfind('/'); | 79 const size_t last_slash = path.rfind('/'); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 bool disable_bailout_shortcut; | 318 bool disable_bailout_shortcut; |
| 319 CHECK(args->GetBoolean(0, &disable_bailout_shortcut)); | 319 CHECK(args->GetBoolean(0, &disable_bailout_shortcut)); |
| 320 | 320 |
| 321 CrosSettings::Get()->SetBoolean( | 321 CrosSettings::Get()->SetBoolean( |
| 322 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled, | 322 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled, |
| 323 !disable_bailout_shortcut); | 323 !disable_bailout_shortcut); |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace chromeos | 326 } // namespace chromeos |
| OLD | NEW |