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/browser/renderer_host/chrome_render_message_filter.h" | 5 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 | 10 |
9 #include "base/bind.h" | 11 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
12 #include "base/metrics/field_trial.h" | 15 #include "base/metrics/field_trial.h" |
13 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 18 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
16 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 19 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
17 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 20 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
18 #include "chrome/browser/net/predictor.h" | 21 #include "chrome/browser/net/predictor.h" |
19 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/profiles/profile_manager.h" | 23 #include "chrome/browser/profiles/profile_manager.h" |
21 #include "chrome/common/render_messages.h" | 24 #include "chrome/common/render_messages.h" |
(...skipping 11 matching lines...) Expand all Loading... |
33 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 36 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
34 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" | 37 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" |
35 #include "extensions/common/manifest_handlers/default_locale_handler.h" | 38 #include "extensions/common/manifest_handlers/default_locale_handler.h" |
36 #endif | 39 #endif |
37 | 40 |
38 using content::BrowserThread; | 41 using content::BrowserThread; |
39 using blink::WebCache; | 42 using blink::WebCache; |
40 | 43 |
41 namespace { | 44 namespace { |
42 | 45 |
43 const uint32 kFilteredMessageClasses[] = { | 46 const uint32_t kFilteredMessageClasses[] = { |
44 ChromeMsgStart, | 47 ChromeMsgStart, ContentSettingsMsgStart, NetworkHintsMsgStart, |
45 ContentSettingsMsgStart, | |
46 NetworkHintsMsgStart, | |
47 }; | 48 }; |
48 | 49 |
49 } // namespace | 50 } // namespace |
50 | 51 |
51 ChromeRenderMessageFilter::ChromeRenderMessageFilter(int render_process_id, | 52 ChromeRenderMessageFilter::ChromeRenderMessageFilter(int render_process_id, |
52 Profile* profile) | 53 Profile* profile) |
53 : BrowserMessageFilter(kFilteredMessageClasses, | 54 : BrowserMessageFilter(kFilteredMessageClasses, |
54 arraysize(kFilteredMessageClasses)), | 55 arraysize(kFilteredMessageClasses)), |
55 render_process_id_(render_process_id), | 56 render_process_id_(render_process_id), |
56 profile_(profile), | 57 profile_(profile), |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 rappor::SampleString(g_browser_process->rappor_service(), metric, | 347 rappor::SampleString(g_browser_process->rappor_service(), metric, |
347 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, sample); | 348 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, sample); |
348 } | 349 } |
349 | 350 |
350 void ChromeRenderMessageFilter::OnRecordRapporURL(const std::string& metric, | 351 void ChromeRenderMessageFilter::OnRecordRapporURL(const std::string& metric, |
351 const GURL& sample) { | 352 const GURL& sample) { |
352 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 353 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
353 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 354 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
354 metric, sample); | 355 metric, sample); |
355 } | 356 } |
OLD | NEW |