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

Side by Side Diff: chrome/browser/media/media_stream_capture_indicator.cc

Issue 16625012: Remove ExtensionURLInfo, make security decisions in render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address feedback Created 7 years, 5 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) 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/media/media_stream_capture_indicator.h" 5 #include "chrome/browser/media/media_stream_capture_indicator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Profile* profile = 48 Profile* profile =
49 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 49 Profile::FromBrowserContext(web_contents->GetBrowserContext());
50 if (!profile) 50 if (!profile)
51 return NULL; 51 return NULL;
52 52
53 ExtensionService* extension_service = profile->GetExtensionService(); 53 ExtensionService* extension_service = profile->GetExtensionService();
54 if (!extension_service) 54 if (!extension_service)
55 return NULL; 55 return NULL;
56 56
57 return extension_service->extensions()->GetExtensionOrAppByURL( 57 return extension_service->extensions()->GetExtensionOrAppByURL(
58 ExtensionURLInfo(web_contents->GetURL())); 58 web_contents->GetURL());
59 } 59 }
60 60
61 // Gets the security originator of the tab. It returns a string with no '/' 61 // Gets the security originator of the tab. It returns a string with no '/'
62 // at the end to display in the UI. 62 // at the end to display in the UI.
63 string16 GetSecurityOrigin(WebContents* web_contents) { 63 string16 GetSecurityOrigin(WebContents* web_contents) {
64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
65 65
66 if (!web_contents) 66 if (!web_contents)
67 return string16(); 67 return string16();
68 68
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 506
507 status_icon_->SetToolTip(l10n_util::GetStringFUTF16( 507 status_icon_->SetToolTip(l10n_util::GetStringFUTF16(
508 message_id, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 508 message_id, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
509 } 509 }
510 510
511 void MediaStreamCaptureIndicator::OnStopScreenCapture( 511 void MediaStreamCaptureIndicator::OnStopScreenCapture(
512 const base::Closure& stop) { 512 const base::Closure& stop) {
513 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 513 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
514 stop.Run(); 514 stop.Run();
515 } 515 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/chrome_geolocation_permission_context.cc ('k') | chrome/browser/nacl_host/nacl_file_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698