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

Side by Side Diff: chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc

Issue 1092963004: [chrome/browser/extensions] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/api/web_request/chrome_extension_web_request _event_router_delegate.h" 5 #include "chrome/browser/extensions/api/web_request/chrome_extension_web_request _event_router_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ~ChromeExtensionWebRequestEventRouterDelegate() { 46 ~ChromeExtensionWebRequestEventRouterDelegate() {
47 } 47 }
48 48
49 void ChromeExtensionWebRequestEventRouterDelegate::LogExtensionActivity( 49 void ChromeExtensionWebRequestEventRouterDelegate::LogExtensionActivity(
50 content::BrowserContext* browser_context, 50 content::BrowserContext* browser_context,
51 bool is_incognito, 51 bool is_incognito,
52 const std::string& extension_id, 52 const std::string& extension_id,
53 const GURL& url, 53 const GURL& url,
54 const std::string& api_call, 54 const std::string& api_call,
55 scoped_ptr<base::DictionaryValue> details) { 55 scoped_ptr<base::DictionaryValue> details) {
56 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 56 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
57 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext( 57 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(
58 browser_context)) 58 browser_context))
59 return; 59 return;
60 60
61 scoped_refptr<extensions::Action> action = 61 scoped_refptr<extensions::Action> action =
62 new extensions::Action(extension_id, 62 new extensions::Action(extension_id,
63 base::Time::Now(), 63 base::Time::Now(),
64 extensions::Action::ACTION_WEB_REQUEST, 64 extensions::Action::ACTION_WEB_REQUEST,
65 api_call); 65 api_call);
66 action->set_page_url(url); 66 action->set_page_url(url);
(...skipping 16 matching lines...) Expand all
83 int filter_tab_id, int filter_window_id, net::URLRequest* request) { 83 int filter_tab_id, int filter_window_id, net::URLRequest* request) {
84 int tab_id = -1; 84 int tab_id = -1;
85 int window_id = -1; 85 int window_id = -1;
86 ExtractExtraRequestDetailsInternal(request, &tab_id, &window_id); 86 ExtractExtraRequestDetailsInternal(request, &tab_id, &window_id);
87 if (filter_tab_id != -1 && tab_id != filter_tab_id) 87 if (filter_tab_id != -1 && tab_id != filter_tab_id)
88 return true; 88 return true;
89 if (filter_window_id != -1 && window_id != filter_window_id) 89 if (filter_window_id != -1 && window_id != filter_window_id)
90 return true; 90 return true;
91 return false; 91 return false;
92 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/streams_private/streams_private_api.cc ('k') | chrome/browser/extensions/app_data_migrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698