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

Side by Side Diff: chrome/browser/metrics/metrics_service.cc

Issue 7558003: Profiles: Bookmark notifications should listen to only a specific profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pkasting nits Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It 10 // A MetricsService instance is typically created at application startup. It
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 NotificationService::AllSources()); 556 NotificationService::AllSources());
557 registrar->Add(observer, content::NOTIFICATION_CHILD_INSTANCE_CREATED, 557 registrar->Add(observer, content::NOTIFICATION_CHILD_INSTANCE_CREATED,
558 NotificationService::AllSources()); 558 NotificationService::AllSources());
559 registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_CRASHED, 559 registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_CRASHED,
560 NotificationService::AllSources()); 560 NotificationService::AllSources());
561 registrar->Add(observer, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED, 561 registrar->Add(observer, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
562 NotificationService::AllSources()); 562 NotificationService::AllSources());
563 registrar->Add(observer, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, 563 registrar->Add(observer, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
564 NotificationService::AllSources()); 564 NotificationService::AllSources());
565 registrar->Add(observer, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED, 565 registrar->Add(observer, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
566 NotificationService::AllSources()); 566 NotificationService::AllBrowserContextsAndSources());
567 } 567 }
568 568
569 void MetricsService::Observe(int type, 569 void MetricsService::Observe(int type,
570 const NotificationSource& source, 570 const NotificationSource& source,
571 const NotificationDetails& details) { 571 const NotificationDetails& details) {
572 DCHECK(current_log_); 572 DCHECK(current_log_);
573 DCHECK(IsSingleThreaded()); 573 DCHECK(IsSingleThreaded());
574 574
575 if (!CanLogNotification(type, source, details)) 575 if (!CanLogNotification(type, source, details))
576 return; 576 return;
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 thread_id = base::PlatformThread::CurrentId(); 1693 thread_id = base::PlatformThread::CurrentId();
1694 return base::PlatformThread::CurrentId() == thread_id; 1694 return base::PlatformThread::CurrentId() == thread_id;
1695 } 1695 }
1696 1696
1697 #if defined(OS_CHROMEOS) 1697 #if defined(OS_CHROMEOS)
1698 void MetricsService::StartExternalMetrics() { 1698 void MetricsService::StartExternalMetrics() {
1699 external_metrics_ = new chromeos::ExternalMetrics; 1699 external_metrics_ = new chromeos::ExternalMetrics;
1700 external_metrics_->Start(); 1700 external_metrics_->Start();
1701 } 1701 }
1702 #endif 1702 #endif
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_bookmarks_module.cc ('k') | chrome/browser/ui/bookmarks/bookmark_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698