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

Unified Diff: chrome/renderer/extensions/media_galleries_custom_bindings.cc

Issue 2382973002: Convert WebSecurityOrigin -> GURL without re-parsing the url (Closed)
Patch Set: rebase on #427122 Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/extensions/resource_request_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/media_galleries_custom_bindings.cc
diff --git a/chrome/renderer/extensions/media_galleries_custom_bindings.cc b/chrome/renderer/extensions/media_galleries_custom_bindings.cc
index 7460a9ec18783bcf28e1a2b6a282beca63356c99..06d4807b3c12923b0f9c530ba714594ab4399fa1 100644
--- a/chrome/renderer/extensions/media_galleries_custom_bindings.cc
+++ b/chrome/renderer/extensions/media_galleries_custom_bindings.cc
@@ -12,6 +12,8 @@
#include "third_party/WebKit/public/web/WebDOMFileSystem.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
+#include "url/gurl.h"
+#include "url/origin.h"
#include "v8/include/v8.h"
namespace extensions {
@@ -37,8 +39,8 @@ void MediaGalleriesCustomBindings::GetMediaFileSystemObject(
blink::WebLocalFrame* webframe =
blink::WebLocalFrame::frameForCurrentContext();
- const GURL origin = blink::WebStringToGURL(
- webframe->document().getSecurityOrigin().toString());
+ const GURL origin =
+ url::Origin(webframe->document().getSecurityOrigin()).GetURL();
std::string fs_name =
storage::GetFileSystemName(origin, storage::kFileSystemTypeExternal);
fs_name.append("_");
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/extensions/resource_request_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698