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

Side by Side Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 years, 10 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) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 return; 1099 return;
1100 } 1100 }
1101 1101
1102 setRequestHeaderInternal(name, value); 1102 setRequestHeaderInternal(name, value);
1103 } 1103 }
1104 1104
1105 void XMLHttpRequest::setRequestHeaderInternal(const AtomicString& name, const At omicString& value) 1105 void XMLHttpRequest::setRequestHeaderInternal(const AtomicString& name, const At omicString& value)
1106 { 1106 {
1107 HTTPHeaderMap::AddResult result = m_requestHeaders.add(name, value); 1107 HTTPHeaderMap::AddResult result = m_requestHeaders.add(name, value);
1108 if (!result.isNewEntry) 1108 if (!result.isNewEntry)
1109 result.iterator->value = result.iterator->value + ", " + value; 1109 result.storedValue->value = result.storedValue->value + ", " + value;
1110 } 1110 }
1111 1111
1112 const AtomicString& XMLHttpRequest::getRequestHeader(const AtomicString& name) c onst 1112 const AtomicString& XMLHttpRequest::getRequestHeader(const AtomicString& name) c onst
1113 { 1113 {
1114 return m_requestHeaders.get(name); 1114 return m_requestHeaders.get(name);
1115 } 1115 }
1116 1116
1117 String XMLHttpRequest::getAllResponseHeaders() const 1117 String XMLHttpRequest::getAllResponseHeaders() const
1118 { 1118 {
1119 if (m_state < HEADERS_RECEIVED || m_error) 1119 if (m_state < HEADERS_RECEIVED || m_error)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 { 1421 {
1422 return EventTargetNames::XMLHttpRequest; 1422 return EventTargetNames::XMLHttpRequest;
1423 } 1423 }
1424 1424
1425 ExecutionContext* XMLHttpRequest::executionContext() const 1425 ExecutionContext* XMLHttpRequest::executionContext() const
1426 { 1426 {
1427 return ActiveDOMObject::executionContext(); 1427 return ActiveDOMObject::executionContext();
1428 } 1428 }
1429 1429
1430 } // namespace WebCore 1430 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/properties/SVGAttributeToPropertyMap.cpp ('k') | Source/modules/webdatabase/QuotaTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698