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

Side by Side Diff: athena/extensions/chrome/extensions_delegate_impl.cc

Issue 720633003: Revert of CL 722703002 due to build breakage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "athena/extensions/public/extensions_delegate.h" 5 #include "athena/extensions/public/extensions_delegate.h"
6 6
7 #include "athena/extensions/chrome/athena_chrome_app_window_client.h" 7 #include "athena/extensions/chrome/athena_chrome_app_window_client.h"
8 #include "athena/extensions/chrome/athena_extension_install_ui.h" 8 #include "athena/extensions/chrome/athena_extension_install_ui.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/extension_util.h" 12 #include "chrome/browser/extensions/extension_util.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/extensions/app_launch_params.h"
15 #include "chrome/browser/ui/extensions/application_launch.h" 14 #include "chrome/browser/ui/extensions/application_launch.h"
16 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" 15 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
17 #include "extensions/browser/extension_registry.h" 16 #include "extensions/browser/extension_registry.h"
18 #include "extensions/browser/extension_system.h" 17 #include "extensions/browser/extension_system.h"
19 #include "extensions/common/constants.h" 18 #include "extensions/common/constants.h"
20 #include "extensions/common/extension_set.h" 19 #include "extensions/common/extension_set.h"
21 #include "extensions/common/extension_urls.h" 20 #include "extensions/common/extension_urls.h"
22 #include "net/base/url_util.h" 21 #include "net/base/url_util.h"
23 22
24 namespace athena { 23 namespace athena {
(...skipping 28 matching lines...) Expand all
53 app_id, extensions::ExtensionRegistry::EVERYTHING); 52 app_id, extensions::ExtensionRegistry::EVERYTHING);
54 DCHECK(extension); 53 DCHECK(extension);
55 if (!extension) 54 if (!extension)
56 return false; 55 return false;
57 56
58 // TODO(oshima): Support installation/enabling process. 57 // TODO(oshima): Support installation/enabling process.
59 if (!extensions::util::IsAppLaunchableWithoutEnabling(app_id, context)) 58 if (!extensions::util::IsAppLaunchableWithoutEnabling(app_id, context))
60 return false; 59 return false;
61 60
62 int event_flags = 0; 61 int event_flags = 0;
63 AppLaunchParams params(Profile::FromBrowserContext(context), extension, 62 AppLaunchParams params(Profile::FromBrowserContext(context),
64 event_flags, chrome::HOST_DESKTOP_TYPE_ASH, 63 extension,
65 extensions::SOURCE_APP_LAUNCHER); 64 event_flags,
65 chrome::HOST_DESKTOP_TYPE_ASH);
66 // TODO(oshima): rename HOST_DESTOP_TYPE_ASH to non native desktop. 66 // TODO(oshima): rename HOST_DESTOP_TYPE_ASH to non native desktop.
67 67
68 if (app_id == extensions::kWebStoreAppId) { 68 if (app_id == extensions::kWebStoreAppId) {
69 std::string source_value = 69 std::string source_value =
70 std::string(extension_urls::kLaunchSourceAppList); 70 std::string(extension_urls::kLaunchSourceAppList);
71 // Set an override URL to include the source. 71 // Set an override URL to include the source.
72 GURL extension_url = 72 GURL extension_url =
73 extensions::AppLaunchInfo::GetFullLaunchURL(extension); 73 extensions::AppLaunchInfo::GetFullLaunchURL(extension);
74 params.override_url = net::AppendQueryParameter( 74 params.override_url = net::AppendQueryParameter(
75 extension_url, extension_urls::kWebstoreSourceField, source_value); 75 extension_url, extension_urls::kWebstoreSourceField, source_value);
(...skipping 28 matching lines...) Expand all
104 104
105 } // namespace 105 } // namespace
106 106
107 // static 107 // static
108 void ExtensionsDelegate::CreateExtensionsDelegate( 108 void ExtensionsDelegate::CreateExtensionsDelegate(
109 content::BrowserContext* context) { 109 content::BrowserContext* context) {
110 new ChromeExtensionsDelegate(context); 110 new ChromeExtensionsDelegate(context);
111 } 111 }
112 112
113 } // namespace athena 113 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698