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

Side by Side Diff: chrome/browser/extensions/api/history/history_api.cc

Issue 18755003: Fix the allHistory flag on chrome.history.onVisitRemoved event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix incorrect direct constructor call. Created 7 years, 5 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/api/history/history_api.h" 5 #include "chrome/browser/extensions/api/history/history_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 bool HistoryDeleteAllFunction::RunAsyncImpl() { 482 bool HistoryDeleteAllFunction::RunAsyncImpl() {
483 if (!VerifyDeleteAllowed()) 483 if (!VerifyDeleteAllowed())
484 return false; 484 return false;
485 485
486 std::set<GURL> restrict_urls; 486 std::set<GURL> restrict_urls;
487 HistoryService* hs = 487 HistoryService* hs =
488 HistoryServiceFactory::GetForProfile(profile(), 488 HistoryServiceFactory::GetForProfile(profile(),
489 Profile::EXPLICIT_ACCESS); 489 Profile::EXPLICIT_ACCESS);
490 hs->ExpireHistoryBetween( 490 hs->ExpireHistoryBetween(
491 restrict_urls, 491 restrict_urls,
492 base::Time::UnixEpoch(), // From the beginning of the epoch. 492 base::Time(), // Unbounded beginning...
493 base::Time::Now(), // To the current time. 493 base::Time(), // ...and the end.
494 base::Bind(&HistoryDeleteAllFunction::DeleteComplete, 494 base::Bind(&HistoryDeleteAllFunction::DeleteComplete,
495 base::Unretained(this)), 495 base::Unretained(this)),
496 &task_tracker_); 496 &task_tracker_);
497 497
498 return true; 498 return true;
499 } 499 }
500 500
501 void HistoryDeleteAllFunction::DeleteComplete() { 501 void HistoryDeleteAllFunction::DeleteComplete() {
502 SendAsyncResponse(); 502 SendAsyncResponse();
503 } 503 }
504 504
505 } // namespace extensions 505 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698