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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 14241002: 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, 8 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/ui/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/extensions/extension_service.h" 22 #include "chrome/browser/extensions/extension_service.h"
23 #include "chrome/browser/extensions/extension_special_storage_policy.h" 23 #include "chrome/browser/extensions/extension_special_storage_policy.h"
24 #include "chrome/browser/notifications/desktop_notification_service.h" 24 #include "chrome/browser/notifications/desktop_notification_service.h"
25 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 25 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
26 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/ui/browser_list.h" 27 #include "chrome/browser/ui/browser_list.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "chrome/common/content_settings.h" 30 #include "chrome/common/content_settings.h"
31 #include "chrome/common/content_settings_pattern.h" 31 #include "chrome/common/content_settings_pattern.h"
32 #include "chrome/common/extensions/app_launcher_info.h"
32 #include "chrome/common/extensions/extension_set.h" 33 #include "chrome/common/extensions/extension_set.h"
33 #include "chrome/common/extensions/permissions/api_permission.h" 34 #include "chrome/common/extensions/permissions/api_permission.h"
34 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
35 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
36 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
37 #include "content/public/browser/notification_source.h" 38 #include "content/public/browser/notification_source.h"
38 #include "content/public/browser/notification_types.h" 39 #include "content/public/browser/notification_types.h"
39 #include "content/public/browser/user_metrics.h" 40 #include "content/public/browser/user_metrics.h"
40 #include "content/public/browser/web_ui.h" 41 #include "content/public/browser/web_ui.h"
41 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (!app_filter(**extension, profile)) continue; 224 if (!app_filter(**extension, profile)) continue;
224 225
225 extensions::URLPatternSet web_extent = (*extension)->web_extent(); 226 extensions::URLPatternSet web_extent = (*extension)->web_extent();
226 // Add patterns from web extent. 227 // Add patterns from web extent.
227 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin(); 228 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin();
228 pattern != web_extent.end(); ++pattern) { 229 pattern != web_extent.end(); ++pattern) {
229 std::string url_pattern = pattern->GetAsString(); 230 std::string url_pattern = pattern->GetAsString();
230 AddExceptionForHostedApp(url_pattern, **extension, exceptions); 231 AddExceptionForHostedApp(url_pattern, **extension, exceptions);
231 } 232 }
232 // Retrieve the launch URL. 233 // Retrieve the launch URL.
233 std::string launch_url_string = (*extension)->launch_web_url(); 234 std::string launch_url_string =
235 extensions::AppLauncherInfo::GetLaunchWebURL(*extension);
234 GURL launch_url(launch_url_string); 236 GURL launch_url(launch_url_string);
235 // Skip adding the launch URL if it is part of the web extent. 237 // Skip adding the launch URL if it is part of the web extent.
236 if (web_extent.MatchesURL(launch_url)) continue; 238 if (web_extent.MatchesURL(launch_url)) continue;
237 AddExceptionForHostedApp(launch_url_string, **extension, exceptions); 239 AddExceptionForHostedApp(launch_url_string, **extension, exceptions);
238 } 240 }
239 } 241 }
240 242
241 } // namespace 243 } // namespace
242 244
243 namespace options { 245 namespace options {
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 media_settings_.flash_default_setting, 1388 media_settings_.flash_default_setting,
1387 media_settings_.flash_exceptions, 1389 media_settings_.flash_exceptions,
1388 media_settings_.policy_disable_audio, 1390 media_settings_.policy_disable_audio,
1389 media_settings_.policy_disable_video)) { 1391 media_settings_.policy_disable_video)) {
1390 ShowFlashMediaLink(EXCEPTIONS, true); 1392 ShowFlashMediaLink(EXCEPTIONS, true);
1391 } 1393 }
1392 } 1394 }
1393 } 1395 }
1394 1396
1395 } // namespace options 1397 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698