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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Issue 2298173002: Implement host-based deletion for the hostname resolution cache. (Closed)
Patch Set: Take TimeTicks::Now() out of the loop 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 | « chrome/browser/io_thread.cc ('k') | net/dns/host_cache.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h"
6 6
7 #include "ash/common/system/chromeos/devicetype_utils.h" 7 #include "ash/common/system/chromeos/devicetype_utils.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h"
9 #include "base/guid.h" 10 #include "base/guid.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
12 #include "base/stl_util.h" 13 #include "base/stl_util.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/browser_shutdown.h" 17 #include "chrome/browser/browser_shutdown.h"
17 #include "chrome/browser/chromeos/input_method/input_method_util.h" 18 #include "chrome/browser/chromeos/input_method/input_method_util.h"
18 #include "chrome/browser/chromeos/language_preferences.h" 19 #include "chrome/browser/chromeos/language_preferences.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 UMA_HISTOGRAM_BOOLEAN("ChromeOS.SAML.Scraping.VerificationResult", success); 157 UMA_HISTOGRAM_BOOLEAN("ChromeOS.SAML.Scraping.VerificationResult", success);
157 } 158 }
158 159
159 // The Task posted to PostTaskAndReply in StartClearingDnsCache on the IO 160 // The Task posted to PostTaskAndReply in StartClearingDnsCache on the IO
160 // thread. 161 // thread.
161 void ClearDnsCache(IOThread* io_thread) { 162 void ClearDnsCache(IOThread* io_thread) {
162 DCHECK_CURRENTLY_ON(BrowserThread::IO); 163 DCHECK_CURRENTLY_ON(BrowserThread::IO);
163 if (browser_shutdown::IsTryingToQuit()) 164 if (browser_shutdown::IsTryingToQuit())
164 return; 165 return;
165 166
166 io_thread->ClearHostCache(); 167 io_thread->ClearHostCache(base::Callback<bool(const std::string&)>());
167 } 168 }
168 169
169 void PushFrontIMIfNotExists(const std::string& input_method, 170 void PushFrontIMIfNotExists(const std::string& input_method,
170 std::vector<std::string>* input_methods) { 171 std::vector<std::string>* input_methods) {
171 if (input_method.empty()) 172 if (input_method.empty())
172 return; 173 return;
173 174
174 if (!base::ContainsValue(*input_methods, input_method)) 175 if (!base::ContainsValue(*input_methods, input_method))
175 input_methods->insert(input_methods->begin(), input_method); 176 input_methods->insert(input_methods->begin(), input_method);
176 } 177 }
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 bool GaiaScreenHandler::IsRestrictiveProxy() const { 840 bool GaiaScreenHandler::IsRestrictiveProxy() const {
840 return !disable_restrictive_proxy_check_for_test_ && 841 return !disable_restrictive_proxy_check_for_test_ &&
841 !IsOnline(captive_portal_status_); 842 !IsOnline(captive_portal_status_);
842 } 843 }
843 844
844 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { 845 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() {
845 disable_restrictive_proxy_check_for_test_ = true; 846 disable_restrictive_proxy_check_for_test_ = true;
846 } 847 }
847 848
848 } // namespace chromeos 849 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/dns/host_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698