| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/extension_history_api.h" | 5 #include "chrome/browser/extensions/extension_history_api.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| 11 #include "base/task.h" | 11 #include "base/task.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/extensions/extension_event_router.h" | 13 #include "chrome/browser/extensions/extension_event_router.h" |
| 14 #include "chrome/browser/extensions/extension_history_api_constants.h" | 14 #include "chrome/browser/extensions/extension_history_api_constants.h" |
| 15 #include "chrome/browser/history/history.h" | 15 #include "chrome/browser/history/history.h" |
| 16 #include "chrome/browser/history/history_types.h" | 16 #include "chrome/browser/history/history_types.h" |
| 17 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/common/notification_type.h" | 18 #include "chrome/common/notification_type.h" |
| 19 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
| 20 | 20 |
| 21 namespace keys = extension_history_api_constants; | 21 namespace keys = extension_history_api_constants; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 double MilliSecondsFromTime(const base::Time& time) { | 25 double MilliSecondsFromTime(const base::Time& time) { |
| 26 return 1000 * time.ToDoubleT(); | 26 return 1000 * time.ToDoubleT(); |
| 27 } | 27 } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 base::Time::Now(), // To the current time. | 379 base::Time::Now(), // To the current time. |
| 380 &cancelable_consumer_, | 380 &cancelable_consumer_, |
| 381 NewCallback(this, &DeleteAllHistoryFunction::DeleteComplete)); | 381 NewCallback(this, &DeleteAllHistoryFunction::DeleteComplete)); |
| 382 | 382 |
| 383 return true; | 383 return true; |
| 384 } | 384 } |
| 385 | 385 |
| 386 void DeleteAllHistoryFunction::DeleteComplete() { | 386 void DeleteAllHistoryFunction::DeleteComplete() { |
| 387 SendAsyncResponse(); | 387 SendAsyncResponse(); |
| 388 } | 388 } |
| OLD | NEW |