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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/Headers.h

Issue 2591723003: [Fetch API] Remove Headers.prototype.getAll() (Closed)
Patch Set: Update get. Created 3 years, 7 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Headers_h 5 #ifndef Headers_h
6 #define Headers_h 6 #define Headers_h
7 7
8 #include "bindings/core/v8/Iterable.h" 8 #include "bindings/core/v8/Iterable.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Shares the FetchHeaderList. Called when creating a Request or Response. 40 // Shares the FetchHeaderList. Called when creating a Request or Response.
41 static Headers* Create(FetchHeaderList*); 41 static Headers* Create(FetchHeaderList*);
42 42
43 Headers* Clone() const; 43 Headers* Clone() const;
44 44
45 // Headers.idl implementation. 45 // Headers.idl implementation.
46 void append(const String& name, const String& value, ExceptionState&); 46 void append(const String& name, const String& value, ExceptionState&);
47 void remove(const String& key, ExceptionState&); 47 void remove(const String& key, ExceptionState&);
48 String get(const String& key, ExceptionState&); 48 String get(const String& key, ExceptionState&);
49 Vector<String> getAll(const String& key, ExceptionState&);
50 bool has(const String& key, ExceptionState&); 49 bool has(const String& key, ExceptionState&);
51 void set(const String& key, const String& value, ExceptionState&); 50 void set(const String& key, const String& value, ExceptionState&);
52 51
53 void SetGuard(Guard guard) { guard_ = guard; } 52 void SetGuard(Guard guard) { guard_ = guard; }
54 Guard GetGuard() const { return guard_; } 53 Guard GetGuard() const { return guard_; }
55 54
56 // These methods should only be called when size() would return 0. 55 // These methods should only be called when size() would return 0.
57 void FillWith(const Headers*, ExceptionState&); 56 void FillWith(const Headers*, ExceptionState&);
58 void FillWith(const Vector<Vector<String>>&, ExceptionState&); 57 void FillWith(const Vector<Vector<String>>&, ExceptionState&);
59 void FillWith(const Vector<std::pair<String, String>>&, ExceptionState&); 58 void FillWith(const Vector<std::pair<String, String>>&, ExceptionState&);
60 59
61 FetchHeaderList* HeaderList() const { return header_list_; } 60 FetchHeaderList* HeaderList() const { return header_list_; }
62 DECLARE_TRACE(); 61 DECLARE_TRACE();
63 62
64 private: 63 private:
65 Headers(); 64 Headers();
66 // Shares the FetchHeaderList. Called when creating a Request or Response. 65 // Shares the FetchHeaderList. Called when creating a Request or Response.
67 explicit Headers(FetchHeaderList*); 66 explicit Headers(FetchHeaderList*);
68 67
69 Member<FetchHeaderList> header_list_; 68 Member<FetchHeaderList> header_list_;
70 Guard guard_; 69 Guard guard_;
71 70
72 IterationSource* StartIteration(ScriptState*, ExceptionState&) override; 71 IterationSource* StartIteration(ScriptState*, ExceptionState&) override;
73 }; 72 };
74 73
75 } // namespace blink 74 } // namespace blink
76 75
77 #endif // Headers_h 76 #endif // Headers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698