Index: chrome/browser/history/web_history_service.h |
diff --git a/chrome/browser/history/web_history_service.h b/chrome/browser/history/web_history_service.h |
index 692efbb0c0c4cc5ca84a34bcfb079b0d8b68ae20..309f4f499c4c825708d3201c1e7c4dd8d4478e6a 100644 |
--- a/chrome/browser/history/web_history_service.h |
+++ b/chrome/browser/history/web_history_service.h |
@@ -50,6 +50,9 @@ class WebHistoryService : public KeyedService { |
typedef base::Callback<void(bool success)> ExpireWebHistoryCallback; |
+ typedef base::Callback<void(bool success, bool new_enabled_value)> |
+ AudioWebHistoryCallback; |
+ |
explicit WebHistoryService(Profile* profile); |
~WebHistoryService() override; |
@@ -76,6 +79,12 @@ class WebHistoryService : public KeyedService { |
base::Time end_time, |
const ExpireWebHistoryCallback& callback); |
+ // Requests whether audio history recording is enabled. |
+ void GetAudioHistoryEnabled(const AudioWebHistoryCallback& callback); |
+ |
+ // Sets the state of audio history recording to |new_enabled_value|. |
+ void SetAudioHistoryEnabled(bool new_enabled_value, |
+ const AudioWebHistoryCallback& callback); |
private: |
// Called by |request| when a web history query has completed. Unpacks the |
// response and calls |callback|, which is the original callback that was |
@@ -93,6 +102,14 @@ class WebHistoryService : public KeyedService { |
WebHistoryService::Request* request, |
bool success); |
+ // Called by |request| when a request to get or set audio history from the |
+ // server has completed. Unpacks the response and calls |callback|, which is |
+ // the original callback that was passed to AudioHistory(). |
+ void AudioHistoryCompletionCallback( |
+ const WebHistoryService::AudioWebHistoryCallback& callback, |
+ WebHistoryService::Request* request, |
+ bool success); |
+ |
Profile* profile_; |
// Stores the version_info token received from the server in response to |
@@ -104,6 +121,9 @@ class WebHistoryService : public KeyedService { |
// shutdown. |
std::set<Request*> pending_expire_requests_; |
+ // Pending requests to be canceled if not complete by profile shutdown. |
+ std::set<Request*> pending_audio_history_requests_; |
+ |
base::WeakPtrFactory<WebHistoryService> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(WebHistoryService); |