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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 12316077: Move the parsing of app.launch related keys out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/extensions/unpacked_installer.h" 21 #include "chrome/browser/extensions/unpacked_installer.h"
22 #include "chrome/browser/extensions/updater/extension_updater.h" 22 #include "chrome/browser/extensions/updater/extension_updater.h"
23 #include "chrome/browser/platform_util.h" 23 #include "chrome/browser/platform_util.h"
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/ui/chrome_select_file_policy.h" 25 #include "chrome/browser/ui/chrome_select_file_policy.h"
26 #include "chrome/browser/ui/extensions/shell_window.h" 26 #include "chrome/browser/ui/extensions/shell_window.h"
27 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 27 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
28 #include "chrome/browser/view_type_utils.h" 28 #include "chrome/browser/view_type_utils.h"
29 #include "chrome/common/extensions/api/developer_private.h" 29 #include "chrome/common/extensions/api/developer_private.h"
30 #include "chrome/common/extensions/api/icons/icons_handler.h" 30 #include "chrome/common/extensions/api/icons/icons_handler.h"
31 #include "chrome/common/extensions/app_launcher_info.h"
31 #include "chrome/common/extensions/background_info.h" 32 #include "chrome/common/extensions/background_info.h"
32 #include "chrome/common/extensions/extension_icon_set.h" 33 #include "chrome/common/extensions/extension_icon_set.h"
33 #include "chrome/common/extensions/extension_resource.h" 34 #include "chrome/common/extensions/extension_resource.h"
34 #include "chrome/common/extensions/manifest_url_handler.h" 35 #include "chrome/common/extensions/manifest_url_handler.h"
35 #include "content/public/browser/browser_thread.h" 36 #include "content/public/browser/browser_thread.h"
36 #include "content/public/browser/render_process_host.h" 37 #include "content/public/browser/render_process_host.h"
37 #include "content/public/browser/render_view_host.h" 38 #include "content/public/browser/render_view_host.h"
38 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
39 #include "extensions/common/constants.h" 40 #include "extensions/common/constants.h"
40 #include "grit/chromium_strings.h" 41 #include "grit/chromium_strings.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 new std::string(ManifestURL::GetOptionsPage(&item).spec())); 177 new std::string(ManifestURL::GetOptionsPage(&item).spec()));
177 } 178 }
178 179
179 if (!ManifestURL::GetUpdateURL(&item).is_empty()) { 180 if (!ManifestURL::GetUpdateURL(&item).is_empty()) {
180 info->update_url.reset( 181 info->update_url.reset(
181 new std::string(ManifestURL::GetUpdateURL(&item).spec())); 182 new std::string(ManifestURL::GetUpdateURL(&item).spec()));
182 } 183 }
183 184
184 if (item.is_app()) { 185 if (item.is_app()) {
185 info->app_launch_url.reset(new std::string( 186 info->app_launch_url.reset(new std::string(
186 item.GetFullLaunchURL().spec())); 187 extensions::AppLauncherInfo::GetFullLaunchURL(&item).spec()));
187 } 188 }
188 189
189 info->may_disable = system->management_policy()-> 190 info->may_disable = system->management_policy()->
190 UserMayModifySettings(&item, NULL); 191 UserMayModifySettings(&item, NULL);
191 info->is_app = item.is_app(); 192 info->is_app = item.is_app();
192 info->views = GetInspectablePagesForExtension(&item, item_is_enabled); 193 info->views = GetInspectablePagesForExtension(&item, item_is_enabled);
193 194
194 return info.Pass(); 195 return info.Pass();
195 } 196 }
196 197
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 844
844 #undef SET_STRING 845 #undef SET_STRING
845 return true; 846 return true;
846 } 847 }
847 848
848 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} 849 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {}
849 850
850 } // namespace api 851 } // namespace api
851 852
852 } // namespace extensions 853 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698