OLD | NEW |
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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return; | 341 return; |
342 | 342 |
343 // Perform some preprocessing of the Action data: convert tab IDs to URLs and | 343 // Perform some preprocessing of the Action data: convert tab IDs to URLs and |
344 // mask out incognito URLs if appropriate. | 344 // mask out incognito URLs if appropriate. |
345 if ((action->action_type() == Action::ACTION_API_CALL || | 345 if ((action->action_type() == Action::ACTION_API_CALL || |
346 action->action_type() == Action::ACTION_API_EVENT) && | 346 action->action_type() == Action::ACTION_API_EVENT) && |
347 StartsWithASCII(action->api_name(), "tabs.", true)) { | 347 StartsWithASCII(action->api_name(), "tabs.", true)) { |
348 LookupTabIds(action, profile_); | 348 LookupTabIds(action, profile_); |
349 } | 349 } |
350 | 350 |
351 // TODO(mvrable): Add any necessary processing of incognito URLs here, for | |
352 // crbug.com/253368 | |
353 | |
354 if (IsDatabaseEnabled() && policy_) | 351 if (IsDatabaseEnabled() && policy_) |
355 policy_->ProcessAction(action); | 352 policy_->ProcessAction(action); |
356 if (IsWatchdogAppActive()) | 353 if (IsWatchdogAppActive()) |
357 observers_->Notify(&Observer::OnExtensionActivity, action); | 354 observers_->Notify(&Observer::OnExtensionActivity, action); |
358 if (testing_mode_) | 355 if (testing_mode_) |
359 LOG(INFO) << action->PrintForDebug(); | 356 LOG(INFO) << action->PrintForDebug(); |
360 } | 357 } |
361 | 358 |
362 void ActivityLog::OnScriptsExecuted( | 359 void ActivityLog::OnScriptsExecuted( |
363 const content::WebContents* web_contents, | 360 const content::WebContents* web_contents, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 | 450 |
454 void ActivityLog::RemoveURL(const GURL& url) { | 451 void ActivityLog::RemoveURL(const GURL& url) { |
455 if (url.is_empty()) | 452 if (url.is_empty()) |
456 return; | 453 return; |
457 std::vector<GURL> urls; | 454 std::vector<GURL> urls; |
458 urls.push_back(url); | 455 urls.push_back(url); |
459 RemoveURLs(urls); | 456 RemoveURLs(urls); |
460 } | 457 } |
461 | 458 |
462 } // namespace extensions | 459 } // namespace extensions |
OLD | NEW |