OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 5 |
6 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 6 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
7 | 7 |
8 #include "base/histogram.h" | 8 #include "base/histogram.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/profile_manager.h" | 14 #include "chrome/browser/profile_manager.h" |
15 #include "chrome/browser/safe_browsing/protocol_manager.h" | 15 #include "chrome/browser/safe_browsing/protocol_manager.h" |
16 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 16 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
17 #include "chrome/browser/safe_browsing/safe_browsing_database.h" | 17 #include "chrome/browser/safe_browsing/safe_browsing_database.h" |
18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
19 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
21 #include "chrome/common/pref_service.h" | 21 #include "chrome/common/pref_service.h" |
22 #include "net/base/registry_controlled_domain.h" | 22 #include "net/base/registry_controlled_domain.h" |
23 | 23 |
| 24 using base::Time; |
| 25 using base::TimeDelta; |
| 26 |
24 SafeBrowsingService::SafeBrowsingService() | 27 SafeBrowsingService::SafeBrowsingService() |
25 : io_loop_(NULL), | 28 : io_loop_(NULL), |
26 database_(NULL), | 29 database_(NULL), |
27 protocol_manager_(NULL), | 30 protocol_manager_(NULL), |
28 enabled_(false), | 31 enabled_(false), |
29 resetting_(false) { | 32 resetting_(false) { |
30 } | 33 } |
31 | 34 |
32 SafeBrowsingService::~SafeBrowsingService() { | 35 SafeBrowsingService::~SafeBrowsingService() { |
33 } | 36 } |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 if (enabled_) { | 562 if (enabled_) { |
560 db_thread_->message_loop()->PostTask(FROM_HERE, | 563 db_thread_->message_loop()->PostTask(FROM_HERE, |
561 NewRunnableMethod(this, &SafeBrowsingService::HandleResume)); | 564 NewRunnableMethod(this, &SafeBrowsingService::HandleResume)); |
562 } | 565 } |
563 } | 566 } |
564 | 567 |
565 void SafeBrowsingService::HandleResume() { | 568 void SafeBrowsingService::HandleResume() { |
566 DCHECK(MessageLoop::current() == db_thread_->message_loop()); | 569 DCHECK(MessageLoop::current() == db_thread_->message_loop()); |
567 GetDatabase()->HandleResume(); | 570 GetDatabase()->HandleResume(); |
568 } | 571 } |
OLD | NEW |