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

Side by Side Diff: third_party/WebKit/WebCore/page/SecurityOrigin.cpp

Issue 8109: Return securityToken to SecurityOrigin (Closed) Base URL: svn://chrome-svn/chrome/branches/chrome_webkit_merge_branch/src/
Patch Set: '' Created 12 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « third_party/WebKit/WebCore/page/SecurityOrigin.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 if (m_protocol != other->m_protocol) 295 if (m_protocol != other->m_protocol)
296 return false; 296 return false;
297 297
298 if (m_port != other->m_port) 298 if (m_port != other->m_port)
299 return false; 299 return false;
300 300
301 return true; 301 return true;
302 } 302 }
303 303
304 String SecurityOrigin::securityToken() const
305 {
306 if (isEmpty())
307 return String();
308
309 if (m_noAccess)
310 return String();
311
312 if (m_domainWasSetInDOM) {
313 // We could encode the document.domain state into the security token,
314 // but this is an uncommon case and leads to complexity. We're better
315 // off sending these accesses down the slow path.
316 return String();
317 }
318
319 return toString();
320 }
321
304 } // namespace WebCore 322 } // namespace WebCore
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/page/SecurityOrigin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698