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

Side by Side Diff: sky/engine/core/dom/DOMURL.cpp

Issue 700753006: Remove PublicURLManager. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/DOMURL.h ('k') | sky/engine/core/dom/ExecutionContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Motorola Mobility Inc. 3 * Copyright (C) 2012 Motorola Mobility Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/dom/DOMURL.h" 28 #include "core/dom/DOMURL.h"
29 29
30 #include "bindings/core/v8/ExceptionMessages.h" 30 #include "bindings/core/v8/ExceptionMessages.h"
31 #include "bindings/core/v8/ExceptionState.h" 31 #include "bindings/core/v8/ExceptionState.h"
32 #include "core/dom/ExceptionCode.h" 32 #include "core/dom/ExceptionCode.h"
33 #include "core/dom/ExecutionContext.h" 33 #include "core/dom/ExecutionContext.h"
34 #include "core/fetch/MemoryCache.h" 34 #include "core/fetch/MemoryCache.h"
35 #include "core/html/PublicURLManager.h"
36 #include "wtf/MainThread.h" 35 #include "wtf/MainThread.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
40 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te) 39 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te)
41 { 40 {
42 ScriptWrappable::init(this); 41 ScriptWrappable::init(this);
43 if (!base.isValid()) 42 if (!base.isValid())
44 exceptionState.throwDOMException(SyntaxError, "Invalid base URL"); 43 exceptionState.throwDOMException(SyntaxError, "Invalid base URL");
45 44
46 m_url = KURL(base, url); 45 m_url = KURL(base, url);
47 if (!m_url.isValid()) 46 if (!m_url.isValid())
48 exceptionState.throwDOMException(SyntaxError, "Invalid URL"); 47 exceptionState.throwDOMException(SyntaxError, "Invalid URL");
49 } 48 }
50 49
51 void DOMURL::setInput(const String& value) 50 void DOMURL::setInput(const String& value)
52 { 51 {
53 KURL url(blankURL(), value); 52 KURL url(blankURL(), value);
54 if (url.isValid()) { 53 if (url.isValid()) {
55 m_url = url; 54 m_url = url;
56 m_input = String(); 55 m_input = String();
57 } else { 56 } else {
58 m_url = KURL(); 57 m_url = KURL();
59 m_input = value; 58 m_input = value;
60 } 59 }
61 } 60 }
62 61
63 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid)
64 {
65 if (!executionContext)
66 return;
67
68 executionContext->publicURLManager().revoke(uuid);
69 }
70
71 } // namespace blink 62 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/DOMURL.h ('k') | sky/engine/core/dom/ExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698