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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 manifest_url.DomainIs("ssl.gstatic.com") && | 1028 manifest_url.DomainIs("ssl.gstatic.com") && |
1029 (manifest_url_path.find("s2/oz/nacl/") == 1 || | 1029 (manifest_url_path.find("s2/oz/nacl/") == 1 || |
1030 manifest_url_path.find("photos/nacl/") == 1); | 1030 manifest_url_path.find("photos/nacl/") == 1); |
1031 | 1031 |
1032 std::string manifest_fs_host; | 1032 std::string manifest_fs_host; |
1033 if (manifest_url.SchemeIsFileSystem() && manifest_url.inner_url()) { | 1033 if (manifest_url.SchemeIsFileSystem() && manifest_url.inner_url()) { |
1034 manifest_fs_host = manifest_url.inner_url()->host(); | 1034 manifest_fs_host = manifest_url.inner_url()->host(); |
1035 } | 1035 } |
1036 bool is_hangouts_app = | 1036 bool is_hangouts_app = |
1037 // Whitelisted apps must be served over secure scheme. | 1037 // Whitelisted apps must be served over secure scheme. |
1038 app_url.SchemeIs("https") && | 1038 app_url.SchemeIs("https") && manifest_url.SchemeIsCryptographic() && |
1039 manifest_url.SchemeIsSecure() && | |
1040 manifest_url.SchemeIsFileSystem() && | 1039 manifest_url.SchemeIsFileSystem() && |
1041 (EndsWith(app_url_host, "talkgadget.google.com", false) || | 1040 (EndsWith(app_url_host, "talkgadget.google.com", false) || |
1042 EndsWith(app_url_host, "plus.google.com", false) || | 1041 EndsWith(app_url_host, "plus.google.com", false) || |
1043 EndsWith(app_url_host, "plus.sandbox.google.com", false)) && | 1042 EndsWith(app_url_host, "plus.sandbox.google.com", false)) && |
1044 // The manifest must be loaded from the host's FileSystem. | 1043 // The manifest must be loaded from the host's FileSystem. |
1045 (manifest_fs_host == app_url_host); | 1044 (manifest_fs_host == app_url_host); |
1046 | 1045 |
1047 bool is_whitelisted_app = is_photo_app || is_hangouts_app; | 1046 bool is_whitelisted_app = is_photo_app || is_hangouts_app; |
1048 | 1047 |
1049 bool is_extension_from_webstore = false; | 1048 bool is_extension_from_webstore = false; |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 | 1638 |
1640 void ChromeContentRendererClient::RecordRappor(const std::string& metric, | 1639 void ChromeContentRendererClient::RecordRappor(const std::string& metric, |
1641 const std::string& sample) { | 1640 const std::string& sample) { |
1642 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRappor(metric, sample)); | 1641 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRappor(metric, sample)); |
1643 } | 1642 } |
1644 | 1643 |
1645 void ChromeContentRendererClient::RecordRapporURL(const std::string& metric, | 1644 void ChromeContentRendererClient::RecordRapporURL(const std::string& metric, |
1646 const GURL& url) { | 1645 const GURL& url) { |
1647 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); | 1646 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); |
1648 } | 1647 } |
OLD | NEW |