Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1030 manifest_url.DomainIs("ssl.gstatic.com") && | 1030 manifest_url.DomainIs("ssl.gstatic.com") && |
| 1031 (manifest_url_path.find("s2/oz/nacl/") == 1 || | 1031 (manifest_url_path.find("s2/oz/nacl/") == 1 || |
| 1032 manifest_url_path.find("photos/nacl/") == 1); | 1032 manifest_url_path.find("photos/nacl/") == 1); |
| 1033 | 1033 |
| 1034 std::string manifest_fs_host; | 1034 std::string manifest_fs_host; |
| 1035 if (manifest_url.SchemeIsFileSystem() && manifest_url.inner_url()) { | 1035 if (manifest_url.SchemeIsFileSystem() && manifest_url.inner_url()) { |
| 1036 manifest_fs_host = manifest_url.inner_url()->host(); | 1036 manifest_fs_host = manifest_url.inner_url()->host(); |
| 1037 } | 1037 } |
| 1038 bool is_hangouts_app = | 1038 bool is_hangouts_app = |
| 1039 // Whitelisted apps must be served over secure scheme. | 1039 // Whitelisted apps must be served over secure scheme. |
| 1040 app_url.SchemeIs("https") && | 1040 app_url.SchemeIs("https") && manifest_url.SchemeIsCryptographic() && |
|
lgarron
2015/05/07 22:53:45
jiayl@: The definition of is_photo_app above check
jiayl
2015/05/08 21:23:40
Sounds good to me
|
jochen (gone - plz use gerrit)
2015/05/08 17:14:21
why not app_url.SchemeIsCryptographic() ?
lgarron
2015/05/08 21:48:40
Updated in the second patch per jiayl@'s pseudo-lg
|
| 1041 manifest_url.SchemeIsSecure() && | |
| 1042 manifest_url.SchemeIsFileSystem() && | 1041 manifest_url.SchemeIsFileSystem() && |
| 1043 (EndsWith(app_url_host, "talkgadget.google.com", false) || | 1042 (EndsWith(app_url_host, "talkgadget.google.com", false) || |
| 1044 EndsWith(app_url_host, "plus.google.com", false) || | 1043 EndsWith(app_url_host, "plus.google.com", false) || |
| 1045 EndsWith(app_url_host, "plus.sandbox.google.com", false)) && | 1044 EndsWith(app_url_host, "plus.sandbox.google.com", false)) && |
| 1046 // The manifest must be loaded from the host's FileSystem. | 1045 // The manifest must be loaded from the host's FileSystem. |
| 1047 (manifest_fs_host == app_url_host); | 1046 (manifest_fs_host == app_url_host); |
| 1048 | 1047 |
| 1049 bool is_whitelisted_app = is_photo_app || is_hangouts_app; | 1048 bool is_whitelisted_app = is_photo_app || is_hangouts_app; |
| 1050 | 1049 |
| 1051 bool is_extension_from_webstore = false; | 1050 bool is_extension_from_webstore = false; |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1644 const GURL& url) { | 1643 const GURL& url) { |
| 1645 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); | 1644 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); |
| 1646 } | 1645 } |
| 1647 | 1646 |
| 1648 scoped_ptr<blink::WebAppBannerClient> | 1647 scoped_ptr<blink::WebAppBannerClient> |
| 1649 ChromeContentRendererClient::CreateAppBannerClient( | 1648 ChromeContentRendererClient::CreateAppBannerClient( |
| 1650 content::RenderFrame* render_frame) { | 1649 content::RenderFrame* render_frame) { |
| 1651 return scoped_ptr<blink::WebAppBannerClient>( | 1650 return scoped_ptr<blink::WebAppBannerClient>( |
| 1652 new AppBannerClient(render_frame)); | 1651 new AppBannerClient(render_frame)); |
| 1653 } | 1652 } |
| OLD | NEW |