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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMURL.cpp

Issue 2151933003: Change WTF::TemporaryChange to be an alias for AutoReset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TemporaryChange -> AutoReset Created 4 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
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 18 matching lines...) Expand all
29 #include "bindings/core/v8/ExceptionMessages.h" 29 #include "bindings/core/v8/ExceptionMessages.h"
30 #include "bindings/core/v8/ExceptionState.h" 30 #include "bindings/core/v8/ExceptionState.h"
31 #include "core/dom/ExceptionCode.h" 31 #include "core/dom/ExceptionCode.h"
32 #include "core/dom/ExecutionContext.h" 32 #include "core/dom/ExecutionContext.h"
33 #include "core/dom/URLSearchParams.h" 33 #include "core/dom/URLSearchParams.h"
34 #include "core/fetch/MemoryCache.h" 34 #include "core/fetch/MemoryCache.h"
35 #include "core/fileapi/Blob.h" 35 #include "core/fileapi/Blob.h"
36 #include "core/html/PublicURLManager.h" 36 #include "core/html/PublicURLManager.h"
37 #include "platform/blob/BlobURL.h" 37 #include "platform/blob/BlobURL.h"
38 #include "platform/weborigin/SecurityOrigin.h" 38 #include "platform/weborigin/SecurityOrigin.h"
39 #include "wtf/TemporaryChange.h" 39 #include "wtf/AutoReset.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te) 43 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te)
44 { 44 {
45 if (!base.isValid()) { 45 if (!base.isValid()) {
46 exceptionState.throwTypeError("Invalid base URL"); 46 exceptionState.throwTypeError("Invalid base URL");
47 return; 47 return;
48 } 48 }
49 49
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void DOMURL::update() 113 void DOMURL::update()
114 { 114 {
115 updateSearchParams(url().query()); 115 updateSearchParams(url().query());
116 } 116 }
117 117
118 void DOMURL::updateSearchParams(const String& queryString) 118 void DOMURL::updateSearchParams(const String& queryString)
119 { 119 {
120 if (!m_searchParams) 120 if (!m_searchParams)
121 return; 121 return;
122 122
123 TemporaryChange<bool> scope(m_isInUpdate, true); 123 AutoReset<bool> scope(&m_isInUpdate, true);
124 ASSERT(m_searchParams->urlObject() == this); 124 ASSERT(m_searchParams->urlObject() == this);
125 m_searchParams->setInput(queryString); 125 m_searchParams->setInput(queryString);
126 } 126 }
127 127
128 } // namespace blink 128 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698