| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 { | 56 { |
| 57 } | 57 } |
| 58 | 58 |
| 59 void IconLoader::startLoading() | 59 void IconLoader::startLoading() |
| 60 { | 60 { |
| 61 if (m_resource || !m_frame->document()) | 61 if (m_resource || !m_frame->document()) |
| 62 return; | 62 return; |
| 63 | 63 |
| 64 CachedResourceRequest request(ResourceRequest(m_frame->loader()->icon()->url
()), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowSt
oredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck)); | 64 CachedResourceRequest request(ResourceRequest(m_frame->loader()->icon()->url
()), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowSt
oredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck)); |
| 65 | 65 |
| 66 #if PLATFORM(BLACKBERRY) | |
| 67 request.mutableResourceRequest().setTargetType(ResourceRequest::TargetIsFavi
con); | |
| 68 #endif | |
| 69 request.mutableResourceRequest().setPriority(ResourceLoadPriorityLow); | 66 request.mutableResourceRequest().setPriority(ResourceLoadPriorityLow); |
| 70 request.setInitiator(cachedResourceRequestInitiators().icon); | 67 request.setInitiator(cachedResourceRequestInitiators().icon); |
| 71 | 68 |
| 72 m_resource = m_frame->document()->cachedResourceLoader()->requestRawResource
(request); | 69 m_resource = m_frame->document()->cachedResourceLoader()->requestRawResource
(request); |
| 73 if (m_resource) | 70 if (m_resource) |
| 74 m_resource->addClient(this); | 71 m_resource->addClient(this); |
| 75 else | 72 else |
| 76 LOG_ERROR("Failed to start load for icon at url %s", m_frame->loader()->
icon()->url().string().ascii().data()); | 73 LOG_ERROR("Failed to start load for icon at url %s", m_frame->loader()->
icon()->url().string().ascii().data()); |
| 77 } | 74 } |
| 78 | 75 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 99 m_frame->loader()->icon()->commitToDatabase(resource->url()); | 96 m_frame->loader()->icon()->commitToDatabase(resource->url()); |
| 100 // Setting the icon data only after committing to the database ensures that
the data is | 97 // Setting the icon data only after committing to the database ensures that
the data is |
| 101 // kept in memory (so it does not have to be read from the database asynchro
nously), since | 98 // kept in memory (so it does not have to be read from the database asynchro
nously), since |
| 102 // there is a page URL referencing it. | 99 // there is a page URL referencing it. |
| 103 iconDatabase().setIconDataForIconURL(data ? data->sharedBuffer() : 0, resour
ce->url().string()); | 100 iconDatabase().setIconDataForIconURL(data ? data->sharedBuffer() : 0, resour
ce->url().string()); |
| 104 m_frame->loader()->client()->dispatchDidReceiveIcon(); | 101 m_frame->loader()->client()->dispatchDidReceiveIcon(); |
| 105 stopLoading(); | 102 stopLoading(); |
| 106 } | 103 } |
| 107 | 104 |
| 108 } | 105 } |
| OLD | NEW |