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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_log.cc

Issue 23980002: Activity Log: allow searching by day (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed error from last rebase Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/activity_log/activity_log.h" 5 #include "chrome/browser/extensions/activity_log/activity_log.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 ++it2) { 407 ++it2) {
408 action->mutable_args()->AppendString(*it2); 408 action->mutable_args()->AppendString(*it2);
409 } 409 }
410 LogAction(action); 410 LogAction(action);
411 } 411 }
412 } 412 }
413 } 413 }
414 414
415 // LOOKUP ACTIONS. ------------------------------------------------------------- 415 // LOOKUP ACTIONS. -------------------------------------------------------------
416 416
417 void ActivityLog::GetActions(
418 const std::string& extension_id,
419 const int day,
420 const base::Callback
421 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& callback) {
422 if (policy_) {
423 policy_->ReadData(extension_id, day, callback);
424 }
425 }
426
427 void ActivityLog::GetFilteredActions( 417 void ActivityLog::GetFilteredActions(
428 const std::string& extension_id, 418 const std::string& extension_id,
429 const Action::ActionType type, 419 const Action::ActionType type,
430 const std::string& api_name, 420 const std::string& api_name,
431 const std::string& page_url, 421 const std::string& page_url,
432 const std::string& arg_url, 422 const std::string& arg_url,
423 const int daysAgo,
433 const base::Callback 424 const base::Callback
434 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& callback) { 425 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& callback) {
435 if (policy_) { 426 if (policy_) {
436 policy_->ReadFilteredData( 427 policy_->ReadFilteredData(
437 extension_id, type, api_name, page_url, arg_url, callback); 428 extension_id, type, api_name, page_url, arg_url, daysAgo, callback);
438 } 429 }
439 } 430 }
440 431
441 // DELETE ACTIONS. ------------------------------------------------------------- 432 // DELETE ACTIONS. -------------------------------------------------------------
442 433
443 void ActivityLog::RemoveURLs(const std::vector<GURL>& restrict_urls) { 434 void ActivityLog::RemoveURLs(const std::vector<GURL>& restrict_urls) {
444 if (!policy_) 435 if (!policy_)
445 return; 436 return;
446 policy_->RemoveURLs(restrict_urls); 437 policy_->RemoveURLs(restrict_urls);
447 } 438 }
(...skipping 18 matching lines...) Expand all
466 RemoveURLs(urls); 457 RemoveURLs(urls);
467 } 458 }
468 459
469 void ActivityLog::DeleteDatabase() { 460 void ActivityLog::DeleteDatabase() {
470 if (!policy_) 461 if (!policy_)
471 return; 462 return;
472 policy_->DeleteDatabase(); 463 policy_->DeleteDatabase();
473 } 464 }
474 465
475 } // namespace extensions 466 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698