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

Side by Side Diff: third_party/WebKit/Source/platform/mojo/ReferrerStructTraits.h

Issue 2896443003: Replace remaining ASSERT with DCHECK/_EQ as appropriate (Closed)
Patch Set: actually fix WorkerBackingthread 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 ReferrerStructTraits_h 5 #ifndef ReferrerStructTraits_h
6 #define ReferrerStructTraits_h 6 #define ReferrerStructTraits_h
7 7
8 #include "platform/weborigin/Referrer.h" 8 #include "platform/weborigin/Referrer.h"
9 #include "platform/weborigin/ReferrerPolicy.h" 9 #include "platform/weborigin/ReferrerPolicy.h"
10 #include "platform/wtf/Assertions.h" 10 #include "platform/wtf/Assertions.h"
(...skipping 19 matching lines...) Expand all
30 static bool Read(blink::mojom::ReferrerDataView data, blink::Referrer* out) { 30 static bool Read(blink::mojom::ReferrerDataView data, blink::Referrer* out) {
31 blink::KURL referrer; 31 blink::KURL referrer;
32 blink::WebReferrerPolicy webReferrerPolicy; 32 blink::WebReferrerPolicy webReferrerPolicy;
33 if (!data.ReadUrl(&referrer) || !data.ReadPolicy(&webReferrerPolicy)) 33 if (!data.ReadUrl(&referrer) || !data.ReadPolicy(&webReferrerPolicy))
34 return false; 34 return false;
35 35
36 out->referrer_policy = 36 out->referrer_policy =
37 static_cast<blink::ReferrerPolicy>(webReferrerPolicy); 37 static_cast<blink::ReferrerPolicy>(webReferrerPolicy);
38 out->referrer = AtomicString(referrer.GetString()); 38 out->referrer = AtomicString(referrer.GetString());
39 39
40 // Mimics the ASSERT() done in the blink::Referrer constructor. 40 // Mimics the DCHECK() done in the blink::Referrer constructor.
41 return referrer.IsValid() || out->referrer == blink::Referrer::NoReferrer(); 41 return referrer.IsValid() || out->referrer == blink::Referrer::NoReferrer();
42 } 42 }
43 }; 43 };
44 44
45 } // namespace mojo 45 } // namespace mojo
46 46
47 #endif // ReferrerStructTraits_h 47 #endif // ReferrerStructTraits_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp ('k') | third_party/WebKit/Source/platform/weborigin/KURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698