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/chromeos/extensions/extension_tab_util_delegate_chromeos.cc

Issue 2830903003: PS - Scrub URL down to origin in Public Sessions (Closed)
Patch Set: Rebase Created 3 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeo s.h"
6
7 #include <string>
8
9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/profiles/profiles_state.h"
11 #include "chrome/common/extensions/api/tabs.h"
12 #include "url/gurl.h"
13
14 namespace extensions {
15
16 ExtensionTabUtilDelegateChromeOS::ExtensionTabUtilDelegateChromeOS() {}
17
18 ExtensionTabUtilDelegateChromeOS::~ExtensionTabUtilDelegateChromeOS() {}
19
20 void ExtensionTabUtilDelegateChromeOS::ScrubTabForExtension(
21 const Extension* extension,
22 content::WebContents* contents,
23 api::tabs::Tab* tab) {
24 if (!profiles::IsPublicSession() || !tab->url) {
25 return;
26 }
27 // Scrub URL down to the origin (security reasons inside Public Sessions).
28 tab->url = base::MakeUnique<std::string>(GURL(*tab->url).GetOrigin().spec());
Andrew T Wilson (Slow) 2017/04/25 15:11:09 Quick question - what happens if the URL in the ta
Devlin 2017/04/25 15:19:22 These values come from us populating a dictionary
29 }
30
31 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698