OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/history/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 return; | 1934 return; |
1935 | 1935 |
1936 FaviconData favicon; | 1936 FaviconData favicon; |
1937 GetFaviconFromDB(id, &favicon); | 1937 GetFaviconFromDB(id, &favicon); |
1938 request->ForwardResult(request->handle(), favicon); | 1938 request->ForwardResult(request->handle(), favicon); |
1939 } | 1939 } |
1940 | 1940 |
1941 void HistoryBackend::SetFavicon( | 1941 void HistoryBackend::SetFavicon( |
1942 const GURL& page_url, | 1942 const GURL& page_url, |
1943 const GURL& icon_url, | 1943 const GURL& icon_url, |
1944 scoped_refptr<RefCountedMemory> data, | 1944 scoped_refptr<base::RefCountedMemory> data, |
1945 IconType icon_type) { | 1945 IconType icon_type) { |
1946 DCHECK(data.get()); | 1946 DCHECK(data.get()); |
1947 if (!thumbnail_db_.get() || !db_.get()) | 1947 if (!thumbnail_db_.get() || !db_.get()) |
1948 return; | 1948 return; |
1949 | 1949 |
1950 FaviconID id = thumbnail_db_->GetFaviconIDForFaviconURL( | 1950 FaviconID id = thumbnail_db_->GetFaviconIDForFaviconURL( |
1951 icon_url, icon_type, NULL); | 1951 icon_url, icon_type, NULL); |
1952 if (!id) | 1952 if (!id) |
1953 id = thumbnail_db_->AddFavicon(icon_url, icon_type); | 1953 id = thumbnail_db_->AddFavicon(icon_url, icon_type); |
1954 | 1954 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2482 info.url_id = visit.url_id; | 2482 info.url_id = visit.url_id; |
2483 info.time = visit.visit_time; | 2483 info.time = visit.visit_time; |
2484 info.transition = visit.transition; | 2484 info.transition = visit.transition; |
2485 // If we don't have a delegate yet during setup or shutdown, we will drop | 2485 // If we don't have a delegate yet during setup or shutdown, we will drop |
2486 // these notifications. | 2486 // these notifications. |
2487 if (delegate_.get()) | 2487 if (delegate_.get()) |
2488 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 2488 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
2489 } | 2489 } |
2490 | 2490 |
2491 } // namespace history | 2491 } // namespace history |
OLD | NEW |