OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/apps/app_info_dialog/app_info_summary_panel.h" | 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/task_runner_util.h" | 15 #include "base/task_runner_util.h" |
16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
17 #include "chrome/browser/extensions/launch_util.h" | 17 #include "chrome/browser/extensions/launch_util.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
21 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 DCHECK(CanSetLaunchType()); | 347 DCHECK(CanSetLaunchType()); |
348 ExtensionService* service = | 348 ExtensionService* service = |
349 extensions::ExtensionSystem::Get(profile_)->extension_service(); | 349 extensions::ExtensionSystem::Get(profile_)->extension_service(); |
350 extensions::SetLaunchType(service, app_->id(), launch_type); | 350 extensions::SetLaunchType(service, app_->id(), launch_type); |
351 } | 351 } |
352 | 352 |
353 bool AppInfoSummaryPanel::CanSetLaunchType() const { | 353 bool AppInfoSummaryPanel::CanSetLaunchType() const { |
354 // V2 apps don't have a launch type, and neither does the Chrome app. | 354 // V2 apps don't have a launch type, and neither does the Chrome app. |
355 return app_->id() != extension_misc::kChromeAppId && !app_->is_platform_app(); | 355 return app_->id() != extension_misc::kChromeAppId && !app_->is_platform_app(); |
356 } | 356 } |
OLD | NEW |