| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/omnibox/base_search_provider.h" | 5 #include "components/omnibox/base_search_provider.h" |
| 6 | 6 |
| 7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/metrics/proto/omnibox_event.pb.h" | 10 #include "components/metrics/proto/omnibox_event.pb.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 SuggestionDeletionHandler( | 34 SuggestionDeletionHandler( |
| 35 const std::string& deletion_url, | 35 const std::string& deletion_url, |
| 36 net::URLRequestContextGetter* request_context, | 36 net::URLRequestContextGetter* request_context, |
| 37 const DeletionCompletedCallback& callback); | 37 const DeletionCompletedCallback& callback); |
| 38 | 38 |
| 39 virtual ~SuggestionDeletionHandler(); | 39 virtual ~SuggestionDeletionHandler(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 // net::URLFetcherDelegate: | 42 // net::URLFetcherDelegate: |
| 43 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 43 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 44 | 44 |
| 45 scoped_ptr<net::URLFetcher> deletion_fetcher_; | 45 scoped_ptr<net::URLFetcher> deletion_fetcher_; |
| 46 DeletionCompletedCallback callback_; | 46 DeletionCompletedCallback callback_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(SuggestionDeletionHandler); | 48 DISALLOW_COPY_AND_ASSIGN(SuggestionDeletionHandler); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 SuggestionDeletionHandler::SuggestionDeletionHandler( | 51 SuggestionDeletionHandler::SuggestionDeletionHandler( |
| 52 const std::string& deletion_url, | 52 const std::string& deletion_url, |
| 53 net::URLRequestContextGetter* request_context, | 53 net::URLRequestContextGetter* request_context, |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 } | 471 } |
| 472 | 472 |
| 473 void BaseSearchProvider::OnDeletionComplete( | 473 void BaseSearchProvider::OnDeletionComplete( |
| 474 bool success, SuggestionDeletionHandler* handler) { | 474 bool success, SuggestionDeletionHandler* handler) { |
| 475 RecordDeletionResult(success); | 475 RecordDeletionResult(success); |
| 476 SuggestionDeletionHandlers::iterator it = std::find( | 476 SuggestionDeletionHandlers::iterator it = std::find( |
| 477 deletion_handlers_.begin(), deletion_handlers_.end(), handler); | 477 deletion_handlers_.begin(), deletion_handlers_.end(), handler); |
| 478 DCHECK(it != deletion_handlers_.end()); | 478 DCHECK(it != deletion_handlers_.end()); |
| 479 deletion_handlers_.erase(it); | 479 deletion_handlers_.erase(it); |
| 480 } | 480 } |
| OLD | NEW |