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

Side by Side Diff: chrome/browser/performance_monitor/performance_monitor.cc

Issue 298883006: Rename NOTIFICATION_EXTENSION_INSTALLED to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 6 years, 7 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/performance_monitor/performance_monitor.h" 5 #include "chrome/browser/performance_monitor/performance_monitor.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 // Start our periodic gathering of metrics. 223 // Start our periodic gathering of metrics.
224 if (!disable_timer_autostart_for_testing_) 224 if (!disable_timer_autostart_for_testing_)
225 timer_.Reset(); 225 timer_.Reset();
226 } 226 }
227 227
228 void PerformanceMonitor::RegisterForNotifications() { 228 void PerformanceMonitor::RegisterForNotifications() {
229 DCHECK(database_logging_enabled_); 229 DCHECK(database_logging_enabled_);
230 230
231 // Extensions 231 // Extensions
232 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, 232 registrar_.Add(this,
233 content::NotificationService::AllSources()); 233 chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
234 content::NotificationService::AllSources());
234 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_ENABLED, 235 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_ENABLED,
235 content::NotificationService::AllSources()); 236 content::NotificationService::AllSources());
236 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 237 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
237 content::NotificationService::AllSources()); 238 content::NotificationService::AllSources());
238 registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, 239 registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE,
239 content::NotificationService::AllSources()); 240 content::NotificationService::AllSources());
240 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 241 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
241 content::NotificationService::AllSources()); 242 content::NotificationService::AllSources());
242 243
243 // Crashes 244 // Crashes
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (initialized_ && !request.url().SchemeIsFile()) 548 if (initialized_ && !request.url().SchemeIsFile())
548 performance_data_for_io_thread_.network_bytes_read += bytes_read; 549 performance_data_for_io_thread_.network_bytes_read += bytes_read;
549 } 550 }
550 551
551 void PerformanceMonitor::Observe(int type, 552 void PerformanceMonitor::Observe(int type,
552 const content::NotificationSource& source, 553 const content::NotificationSource& source,
553 const content::NotificationDetails& details) { 554 const content::NotificationDetails& details) {
554 DCHECK(database_logging_enabled_); 555 DCHECK(database_logging_enabled_);
555 556
556 switch (type) { 557 switch (type) {
557 case chrome::NOTIFICATION_EXTENSION_INSTALLED: { 558 case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
558 AddExtensionEvent( 559 AddExtensionEvent(
559 EVENT_EXTENSION_INSTALL, 560 EVENT_EXTENSION_INSTALL,
560 content::Details<const extensions::InstalledExtensionInfo>(details)-> 561 content::Details<const extensions::InstalledExtensionInfo>(details)->
561 extension); 562 extension);
562 break; 563 break;
563 } 564 }
564 case chrome::NOTIFICATION_EXTENSION_ENABLED: { 565 case chrome::NOTIFICATION_EXTENSION_ENABLED: {
565 AddExtensionEvent(EVENT_EXTENSION_ENABLE, 566 AddExtensionEvent(EVENT_EXTENSION_ENABLE,
566 content::Details<Extension>(details).ptr()); 567 content::Details<Extension>(details).ptr());
567 break; 568 break;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 if (!url_list.empty()) 704 if (!url_list.empty())
704 url_list += ", "; 705 url_list += ", ";
705 706
706 url_list += url; 707 url_list += url;
707 } 708 }
708 709
709 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); 710 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list));
710 } 711 }
711 712
712 } // namespace performance_monitor 713 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_startup_installer_browsertest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698