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

Side by Side Diff: chrome/browser/webdata/web_data_service.cc

Issue 11493003: Remove the protector service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix implicit ExtensionSystem -> TemplateURLService dependency Created 8 years 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 | Annotate | Revision Log
OLDNEW
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/webdata/web_data_service.h" 5 #include "chrome/browser/webdata/web_data_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 } // namespace 67 } // namespace
68 68
69 WDAppImagesResult::WDAppImagesResult() : has_all_images(false) {} 69 WDAppImagesResult::WDAppImagesResult() : has_all_images(false) {}
70 70
71 WDAppImagesResult::~WDAppImagesResult() {} 71 WDAppImagesResult::~WDAppImagesResult() {}
72 72
73 WDKeywordsResult::WDKeywordsResult() 73 WDKeywordsResult::WDKeywordsResult()
74 : default_search_provider_id(0), 74 : default_search_provider_id(0),
75 builtin_keyword_version(0), 75 builtin_keyword_version(0) {
76 backup_valid(false),
77 did_default_search_provider_change(false) {
78 } 76 }
79 77
80 WDKeywordsResult::~WDKeywordsResult() {} 78 WDKeywordsResult::~WDKeywordsResult() {}
81 79
82 WebDataService::WebDataService() 80 WebDataService::WebDataService()
83 : is_running_(false), 81 : is_running_(false),
84 db_(NULL), 82 db_(NULL),
85 autocomplete_syncable_service_(NULL), 83 autocomplete_syncable_service_(NULL),
86 autofill_profile_syncable_service_(NULL), 84 autofill_profile_syncable_service_(NULL),
87 failed_init_(false), 85 failed_init_(false),
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 791
794 void WebDataService::GetKeywordsImpl(WebDataRequest* request) { 792 void WebDataService::GetKeywordsImpl(WebDataRequest* request) {
795 InitializeDatabaseIfNecessary(); 793 InitializeDatabaseIfNecessary();
796 if (db_ && !request->IsCancelled(NULL)) { 794 if (db_ && !request->IsCancelled(NULL)) {
797 WDKeywordsResult result; 795 WDKeywordsResult result;
798 db_->GetKeywordTable()->GetKeywords(&result.keywords); 796 db_->GetKeywordTable()->GetKeywords(&result.keywords);
799 result.default_search_provider_id = 797 result.default_search_provider_id =
800 db_->GetKeywordTable()->GetDefaultSearchProviderID(); 798 db_->GetKeywordTable()->GetDefaultSearchProviderID();
801 result.builtin_keyword_version = 799 result.builtin_keyword_version =
802 db_->GetKeywordTable()->GetBuiltinKeywordVersion(); 800 db_->GetKeywordTable()->GetBuiltinKeywordVersion();
803 result.did_default_search_provider_change =
804 db_->GetKeywordTable()->DidDefaultSearchProviderChange();
805 result.backup_valid = result.did_default_search_provider_change &&
806 db_->GetKeywordTable()->GetDefaultSearchProviderBackup(
807 &result.default_search_provider_backup);
808 request->SetResult( 801 request->SetResult(
809 new WDResult<WDKeywordsResult>(KEYWORDS_RESULT, result)); 802 new WDResult<WDKeywordsResult>(KEYWORDS_RESULT, result));
810 } 803 }
811 request->RequestComplete(); 804 request->RequestComplete();
812 } 805 }
813 806
814 void WebDataService::SetDefaultSearchProviderImpl( 807 void WebDataService::SetDefaultSearchProviderImpl(
815 GenericRequest<TemplateURLID>* request) { 808 GenericRequest<TemplateURLID>* request) {
816 InitializeDatabaseIfNecessary(); 809 InitializeDatabaseIfNecessary();
817 if (db_ && !request->IsCancelled(NULL)) { 810 if (db_ && !request->IsCancelled(NULL)) {
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 } 1507 }
1515 1508
1516 const WDTypedResult* WebDataService::WebDataRequest::GetResult() const { 1509 const WDTypedResult* WebDataService::WebDataRequest::GetResult() const {
1517 return result_; 1510 return result_;
1518 } 1511 }
1519 1512
1520 void WebDataService::WebDataRequest::RequestComplete() { 1513 void WebDataService::WebDataRequest::RequestComplete() {
1521 message_loop_->PostTask(FROM_HERE, Bind(&WebDataService::RequestCompleted, 1514 message_loop_->PostTask(FROM_HERE, Bind(&WebDataService::RequestCompleted,
1522 service_.get(), handle_)); 1515 service_.get(), handle_));
1523 } 1516 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_data_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698