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

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: Created 7 years, 6 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Profile* profile = 50 Profile* profile =
51 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 51 Profile::FromBrowserContext(web_contents->GetBrowserContext());
52 if (!profile) 52 if (!profile)
53 return NULL; 53 return NULL;
54 54
55 ExtensionService* extension_service = profile->GetExtensionService(); 55 ExtensionService* extension_service = profile->GetExtensionService();
56 if (!extension_service) 56 if (!extension_service)
57 return NULL; 57 return NULL;
58 58
59 return extension_service->extensions()->GetExtensionOrAppByURL( 59 return extension_service->extensions()->GetExtensionOrAppByURL(
60 ExtensionURLInfo(web_contents->GetURL())); 60 web_contents->GetURL());
61 } 61 }
62 62
63 // Gets the security originator of the tab. It returns a string with no '/' 63 // Gets the security originator of the tab. It returns a string with no '/'
64 // at the end to display in the UI. 64 // at the end to display in the UI.
65 string16 GetSecurityOrigin(WebContents* web_contents) { 65 string16 GetSecurityOrigin(WebContents* web_contents) {
66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
67 67
68 if (!web_contents) 68 if (!web_contents)
69 return string16(); 69 return string16();
70 70
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 status_icon_->SetToolTip(l10n_util::GetStringFUTF16( 563 status_icon_->SetToolTip(l10n_util::GetStringFUTF16(
564 message_id, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 564 message_id, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
565 } 565 }
566 566
567 void MediaStreamCaptureIndicator::OnStopScreenCapture( 567 void MediaStreamCaptureIndicator::OnStopScreenCapture(
568 const base::Closure& stop) { 568 const base::Closure& stop) {
569 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 569 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
570 stop.Run(); 570 stop.Run();
571 } 571 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698