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

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

Issue 14238037: Made it possible to tell whether an extension is being installed or updated. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added extra check. Created 7 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 if (initialized_ && !request.url().SchemeIsFile()) 486 if (initialized_ && !request.url().SchemeIsFile())
487 performance_data_for_io_thread_.network_bytes_read += bytes_read; 487 performance_data_for_io_thread_.network_bytes_read += bytes_read;
488 } 488 }
489 489
490 void PerformanceMonitor::Observe(int type, 490 void PerformanceMonitor::Observe(int type,
491 const content::NotificationSource& source, 491 const content::NotificationSource& source,
492 const content::NotificationDetails& details) { 492 const content::NotificationDetails& details) {
493 switch (type) { 493 switch (type) {
494 case chrome::NOTIFICATION_EXTENSION_INSTALLED: { 494 case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
495 AddExtensionEvent(EVENT_EXTENSION_INSTALL, 495 AddExtensionEvent(
496 content::Details<Extension>(details).ptr()); 496 EVENT_EXTENSION_INSTALL,
497 content::Details<const extensions::InstalledExtensionInfo>(details)->
498 extension);
497 break; 499 break;
498 } 500 }
499 case chrome::NOTIFICATION_EXTENSION_ENABLED: { 501 case chrome::NOTIFICATION_EXTENSION_ENABLED: {
500 AddExtensionEvent(EVENT_EXTENSION_ENABLE, 502 AddExtensionEvent(EVENT_EXTENSION_ENABLE,
501 content::Details<Extension>(details).ptr()); 503 content::Details<Extension>(details).ptr());
502 break; 504 break;
503 } 505 }
504 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { 506 case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
505 const extensions::UnloadedExtensionInfo* info = 507 const extensions::UnloadedExtensionInfo* info =
506 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); 508 content::Details<extensions::UnloadedExtensionInfo>(details).ptr();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 if (!url_list.empty()) 644 if (!url_list.empty())
643 url_list += ", "; 645 url_list += ", ";
644 646
645 url_list += url; 647 url_list += url;
646 } 648 }
647 649
648 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); 650 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list));
649 } 651 }
650 652
651 } // namespace performance_monitor 653 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_user_service.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698