| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 const char* NavigatorDoNotTrack::supplementName() | 53 const char* NavigatorDoNotTrack::supplementName() |
| 54 { | 54 { |
| 55 return "NavigatorDoNotTrack"; | 55 return "NavigatorDoNotTrack"; |
| 56 } | 56 } |
| 57 | 57 |
| 58 NavigatorDoNotTrack& NavigatorDoNotTrack::from(Navigator& navigator) | 58 NavigatorDoNotTrack& NavigatorDoNotTrack::from(Navigator& navigator) |
| 59 { | 59 { |
| 60 NavigatorDoNotTrack* supplement = static_cast<NavigatorDoNotTrack*>(WillBeHe
apSupplement<Navigator>::from(navigator, supplementName())); | 60 NavigatorDoNotTrack* supplement = static_cast<NavigatorDoNotTrack*>(WillBeHe
apSupplement<Navigator>::from(navigator, supplementName())); |
| 61 if (!supplement) { | 61 if (!supplement) { |
| 62 supplement = new NavigatorDoNotTrack(navigator.frame()); | 62 supplement = new NavigatorDoNotTrack(navigator.localFrame()); |
| 63 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); | 63 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); |
| 64 } | 64 } |
| 65 return *supplement; | 65 return *supplement; |
| 66 } | 66 } |
| 67 | 67 |
| 68 String NavigatorDoNotTrack::doNotTrack(Navigator& navigator) | 68 String NavigatorDoNotTrack::doNotTrack(Navigator& navigator) |
| 69 { | 69 { |
| 70 return NavigatorDoNotTrack::from(navigator).doNotTrack(); | 70 return NavigatorDoNotTrack::from(navigator).doNotTrack(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 String NavigatorDoNotTrack::doNotTrack() | 73 String NavigatorDoNotTrack::doNotTrack() |
| 74 { | 74 { |
| 75 if (!frame() || !frame()->loader().client()) | 75 if (!localFrame() || !localFrame()->loader().client()) |
| 76 return String(); | 76 return String(); |
| 77 return frame()->loader().client()->doNotTrackValue(); | 77 return localFrame()->loader().client()->doNotTrackValue(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |