OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ntp/ntp_user_data_logger.h" | 5 #include "chrome/browser/ui/webui/ntp/ntp_user_data_logger.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/strings/stringprintf.h" | |
12 #include "chrome/browser/after_startup_task_utils.h" | 11 #include "chrome/browser/after_startup_task_utils.h" |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/search/search.h" | 13 #include "chrome/browser/search/search.h" |
15 #include "chrome/browser/sync/profile_sync_service_factory.h" | 14 #include "chrome/browser/sync/profile_sync_service_factory.h" |
16 #include "chrome/common/search/search_urls.h" | 15 #include "chrome/common/search/search_urls.h" |
17 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
18 #include "components/browser_sync/profile_sync_service.h" | 17 #include "components/browser_sync/profile_sync_service.h" |
19 #include "components/ntp_tiles/metrics.h" | 18 #include "components/ntp_tiles/metrics.h" |
20 #include "components/sync_sessions/sessions_sync_manager.h" | 19 #include "components/sync_sessions/sessions_sync_manager.h" |
21 #include "components/sync_sessions/sync_sessions_metrics.h" | 20 #include "components/sync_sessions/sync_sessions_metrics.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 std::string source = ntp_url_.SchemeIsHTTPOrHTTPS() ? "Web" : "LocalNTP"; | 192 std::string source = ntp_url_.SchemeIsHTTPOrHTTPS() ? "Web" : "LocalNTP"; |
194 LogLoadTimeHistogram("NewTabPage.LoadTime." + source, load_time); | 193 LogLoadTimeHistogram("NewTabPage.LoadTime." + source, load_time); |
195 | 194 |
196 // Split between Startup and non-startup. | 195 // Split between Startup and non-startup. |
197 std::string status = during_startup_ ? "Startup" : "NewTab"; | 196 std::string status = during_startup_ ? "Startup" : "NewTab"; |
198 LogLoadTimeHistogram("NewTabPage.LoadTime." + status, load_time); | 197 LogLoadTimeHistogram("NewTabPage.LoadTime." + status, load_time); |
199 | 198 |
200 has_emitted_ = true; | 199 has_emitted_ = true; |
201 during_startup_ = false; | 200 during_startup_ = false; |
202 } | 201 } |
OLD | NEW |