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

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

Issue 23923003: Expand RuntimeErrors for ErrorConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyright fix Created 7 years, 3 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 | « chrome/browser/extensions/extension_host.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | 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) 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/extensions/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h"
8 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/activity_log/activity_log.h" 10 #include "chrome/browser/extensions/activity_log/activity_log.h"
10 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" 11 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
11 #include "chrome/browser/extensions/api/declarative_content/content_rules_regist ry.h" 12 #include "chrome/browser/extensions/api/declarative_content/content_rules_regist ry.h"
12 #include "chrome/browser/extensions/crx_installer.h" 13 #include "chrome/browser/extensions/crx_installer.h"
13 #include "chrome/browser/extensions/error_console/error_console.h" 14 #include "chrome/browser/extensions/error_console/error_console.h"
14 #include "chrome/browser/extensions/extension_action.h" 15 #include "chrome/browser/extensions/extension_action.h"
15 #include "chrome/browser/extensions/extension_action_manager.h" 16 #include "chrome/browser/extensions/extension_action_manager.h"
16 #include "chrome/browser/extensions/extension_service.h" 17 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/extensions/extension_system.h" 18 #include "chrome/browser/extensions/extension_system.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 358 }
358 359
359 void TabHelper::OnDetailedConsoleMessageAdded( 360 void TabHelper::OnDetailedConsoleMessageAdded(
360 const base::string16& message, 361 const base::string16& message,
361 const base::string16& source, 362 const base::string16& source,
362 const StackTrace& stack_trace, 363 const StackTrace& stack_trace,
363 int32 severity_level) { 364 int32 severity_level) {
364 if (IsSourceFromAnExtension(source)) { 365 if (IsSourceFromAnExtension(source)) {
365 ErrorConsole::Get(profile_)->ReportError( 366 ErrorConsole::Get(profile_)->ReportError(
366 scoped_ptr<ExtensionError>(new RuntimeError( 367 scoped_ptr<ExtensionError>(new RuntimeError(
368 extension_app_ ? extension_app_->id() : EmptyString(),
367 profile_->IsOffTheRecord(), 369 profile_->IsOffTheRecord(),
368 source, 370 source,
369 message, 371 message,
370 stack_trace, 372 stack_trace,
371 web_contents() ? 373 web_contents() ?
372 web_contents()->GetLastCommittedURL() : GURL::EmptyGURL(), 374 web_contents()->GetLastCommittedURL() : GURL::EmptyGURL(),
373 static_cast<logging::LogSeverity>(severity_level)))); 375 static_cast<logging::LogSeverity>(severity_level))));
374 } 376 }
375 } 377 }
376 378
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } 479 }
478 } 480 }
479 481
480 void TabHelper::SetTabId(RenderViewHost* render_view_host) { 482 void TabHelper::SetTabId(RenderViewHost* render_view_host) {
481 render_view_host->Send( 483 render_view_host->Send(
482 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), 484 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(),
483 SessionID::IdForTab(web_contents()))); 485 SessionID::IdForTab(web_contents())));
484 } 486 }
485 487
486 } // namespace extensions 488 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698