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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3825 std::map<std::string, BrowsingDataRemover::TimePeriod> string_to_time_period; | 3825 std::map<std::string, BrowsingDataRemover::TimePeriod> string_to_time_period; |
3826 string_to_time_period["LAST_HOUR"] = BrowsingDataRemover::LAST_HOUR; | 3826 string_to_time_period["LAST_HOUR"] = BrowsingDataRemover::LAST_HOUR; |
3827 string_to_time_period["LAST_DAY"] = BrowsingDataRemover::LAST_DAY; | 3827 string_to_time_period["LAST_DAY"] = BrowsingDataRemover::LAST_DAY; |
3828 string_to_time_period["LAST_WEEK"] = BrowsingDataRemover::LAST_WEEK; | 3828 string_to_time_period["LAST_WEEK"] = BrowsingDataRemover::LAST_WEEK; |
3829 string_to_time_period["FOUR_WEEKS"] = BrowsingDataRemover::FOUR_WEEKS; | 3829 string_to_time_period["FOUR_WEEKS"] = BrowsingDataRemover::FOUR_WEEKS; |
3830 string_to_time_period["EVERYTHING"] = BrowsingDataRemover::EVERYTHING; | 3830 string_to_time_period["EVERYTHING"] = BrowsingDataRemover::EVERYTHING; |
3831 | 3831 |
3832 std::map<std::string, int> string_to_mask_value; | 3832 std::map<std::string, int> string_to_mask_value; |
3833 string_to_mask_value["HISTORY"] = BrowsingDataRemover::REMOVE_HISTORY; | 3833 string_to_mask_value["HISTORY"] = BrowsingDataRemover::REMOVE_HISTORY; |
3834 string_to_mask_value["DOWNLOADS"] = BrowsingDataRemover::REMOVE_DOWNLOADS; | 3834 string_to_mask_value["DOWNLOADS"] = BrowsingDataRemover::REMOVE_DOWNLOADS; |
3835 string_to_mask_value["COOKIES"] = BrowsingDataRemover::REMOVE_COOKIES; | 3835 string_to_mask_value["COOKIES"] = BrowsingDataRemover::REMOVE_SITE_DATA; |
3836 string_to_mask_value["PASSWORDS"] = BrowsingDataRemover::REMOVE_PASSWORDS; | 3836 string_to_mask_value["PASSWORDS"] = BrowsingDataRemover::REMOVE_PASSWORDS; |
3837 string_to_mask_value["FORM_DATA"] = BrowsingDataRemover::REMOVE_FORM_DATA; | 3837 string_to_mask_value["FORM_DATA"] = BrowsingDataRemover::REMOVE_FORM_DATA; |
3838 string_to_mask_value["CACHE"] = BrowsingDataRemover::REMOVE_CACHE; | 3838 string_to_mask_value["CACHE"] = BrowsingDataRemover::REMOVE_CACHE; |
3839 | 3839 |
3840 std::string time_period; | 3840 std::string time_period; |
3841 ListValue* to_remove; | 3841 ListValue* to_remove; |
3842 if (!args->GetString("time_period", &time_period) || | 3842 if (!args->GetString("time_period", &time_period) || |
3843 !args->GetList("to_remove", &to_remove)) { | 3843 !args->GetList("to_remove", &to_remove)) { |
3844 AutomationJSONReply(this, reply_message) | 3844 AutomationJSONReply(this, reply_message) |
3845 .SendError("time_period must be a string and to_remove a list."); | 3845 .SendError("time_period must be a string and to_remove a list."); |
(...skipping 2491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6337 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); | 6337 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); |
6338 | 6338 |
6339 Send(reply_message_); | 6339 Send(reply_message_); |
6340 redirect_query_ = 0; | 6340 redirect_query_ = 0; |
6341 reply_message_ = NULL; | 6341 reply_message_ = NULL; |
6342 } | 6342 } |
6343 | 6343 |
6344 void TestingAutomationProvider::OnRemoveProvider() { | 6344 void TestingAutomationProvider::OnRemoveProvider() { |
6345 AutomationProviderList::GetInstance()->RemoveProvider(this); | 6345 AutomationProviderList::GetInstance()->RemoveProvider(this); |
6346 } | 6346 } |
OLD | NEW |