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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_log.cc

Issue 2906183002: [Extensions] Fix bad check in SetActivityHandlers() (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/extensions/activity_log/activity_log.h" 5 #include "chrome/browser/extensions/activity_log/activity_log.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 activity_monitor::Monitor current_function_monitor = 516 activity_monitor::Monitor current_function_monitor =
517 activity_monitor::GetApiFunctionMonitor(); 517 activity_monitor::GetApiFunctionMonitor();
518 DCHECK(!current_function_monitor || 518 DCHECK(!current_function_monitor ||
519 current_function_monitor == &LogApiFunction); 519 current_function_monitor == &LogApiFunction);
520 if (!current_function_monitor) 520 if (!current_function_monitor)
521 activity_monitor::SetApiFunctionMonitor(&LogApiFunction); 521 activity_monitor::SetApiFunctionMonitor(&LogApiFunction);
522 522
523 activity_monitor::Monitor current_event_monitor = 523 activity_monitor::Monitor current_event_monitor =
524 activity_monitor::GetApiEventMonitor(); 524 activity_monitor::GetApiEventMonitor();
525 DCHECK(!current_event_monitor || current_event_monitor == &LogApiEvent); 525 DCHECK(!current_event_monitor || current_event_monitor == &LogApiEvent);
526 if (!current_function_monitor) 526 if (!current_event_monitor)
527 activity_monitor::SetApiEventMonitor(&LogApiEvent); 527 activity_monitor::SetApiEventMonitor(&LogApiEvent);
528 528
529 activity_monitor::WebRequestMonitor current_web_request_monitor = 529 activity_monitor::WebRequestMonitor current_web_request_monitor =
530 activity_monitor::GetWebRequestMonitor(); 530 activity_monitor::GetWebRequestMonitor();
531 DCHECK(!current_web_request_monitor || 531 DCHECK(!current_web_request_monitor ||
532 current_web_request_monitor == &LogWebRequestActivity); 532 current_web_request_monitor == &LogWebRequestActivity);
533 if (!current_web_request_monitor) 533 if (!current_web_request_monitor)
534 activity_monitor::SetWebRequestMonitor(&LogWebRequestActivity); 534 activity_monitor::SetWebRequestMonitor(&LogWebRequestActivity);
535 } 535 }
536 536
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 } 939 }
940 } 940 }
941 941
942 template <> 942 template <>
943 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { 943 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() {
944 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 944 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
945 DependsOn(ExtensionRegistryFactory::GetInstance()); 945 DependsOn(ExtensionRegistryFactory::GetInstance());
946 } 946 }
947 947
948 } // namespace extensions 948 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698