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

Side by Side Diff: android_webview/browser/icon_helper.cc

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [rebase] Created 4 years, 3 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
« no previous file with comments | « android_webview/browser/icon_helper.h ('k') | android_webview/native/state_serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "android_webview/browser/icon_helper.h" 5 #include "android_webview/browser/icon_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 break; 91 break;
92 default: 92 default:
93 NOTREACHED(); 93 NOTREACHED();
94 break; 94 break;
95 } 95 }
96 } 96 }
97 } 97 }
98 98
99 void IconHelper::DidStartNavigationToPendingEntry( 99 void IconHelper::DidStartNavigationToPendingEntry(
100 const GURL& url, 100 const GURL& url,
101 content::NavigationController::ReloadType reload_type) { 101 content::ReloadType reload_type) {
102 if (reload_type == content::NavigationController::RELOAD_BYPASSING_CACHE) 102 if (reload_type == content::ReloadType::BYPASSING_CACHE)
103 ClearUnableToDownloadFavicons(); 103 ClearUnableToDownloadFavicons();
104 } 104 }
105 105
106 void IconHelper::MarkUnableToDownloadFavicon(const GURL& icon_url) { 106 void IconHelper::MarkUnableToDownloadFavicon(const GURL& icon_url) {
107 MissingFaviconURLHash url_hash = base::Hash(icon_url.spec()); 107 MissingFaviconURLHash url_hash = base::Hash(icon_url.spec());
108 missing_favicon_urls_.insert(url_hash); 108 missing_favicon_urls_.insert(url_hash);
109 } 109 }
110 110
111 bool IconHelper::WasUnableToDownloadFavicon(const GURL& icon_url) const { 111 bool IconHelper::WasUnableToDownloadFavicon(const GURL& icon_url) const {
112 MissingFaviconURLHash url_hash = base::Hash(icon_url.spec()); 112 MissingFaviconURLHash url_hash = base::Hash(icon_url.spec());
113 return missing_favicon_urls_.find(url_hash) != missing_favicon_urls_.end(); 113 return missing_favicon_urls_.find(url_hash) != missing_favicon_urls_.end();
114 } 114 }
115 115
116 void IconHelper::ClearUnableToDownloadFavicons() { 116 void IconHelper::ClearUnableToDownloadFavicons() {
117 missing_favicon_urls_.clear(); 117 missing_favicon_urls_.clear();
118 } 118 }
119 119
120 } // namespace android_webview 120 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/icon_helper.h ('k') | android_webview/native/state_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698