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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 7819009: For the SSL cert status, convert anonymous enum that gives bit values into a typedefed uint32. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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/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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 NavigationController* tab = tab_tracker_->GetResource(tab_handle); 1461 NavigationController* tab = tab_tracker_->GetResource(tab_handle);
1462 restore_tracker_.reset( 1462 restore_tracker_.reset(
1463 new NavigationControllerRestoredObserver(this, tab, reply_message)); 1463 new NavigationControllerRestoredObserver(this, tab, reply_message));
1464 } else { 1464 } else {
1465 AutomationMsg_WaitForTabToBeRestored::WriteReplyParams( 1465 AutomationMsg_WaitForTabToBeRestored::WriteReplyParams(
1466 reply_message, false); 1466 reply_message, false);
1467 Send(reply_message); 1467 Send(reply_message);
1468 } 1468 }
1469 } 1469 }
1470 1470
1471 void TestingAutomationProvider::GetSecurityState(int handle, 1471 void TestingAutomationProvider::GetSecurityState(
1472 bool* success, 1472 int handle,
1473 SecurityStyle* security_style, 1473 bool* success,
1474 int* ssl_cert_status, 1474 SecurityStyle* security_style,
1475 int* insecure_content_status) { 1475 net::CertStatus* ssl_cert_status,
1476 int* insecure_content_status) {
1476 if (tab_tracker_->ContainsHandle(handle)) { 1477 if (tab_tracker_->ContainsHandle(handle)) {
1477 NavigationController* tab = tab_tracker_->GetResource(handle); 1478 NavigationController* tab = tab_tracker_->GetResource(handle);
1478 NavigationEntry* entry = tab->GetActiveEntry(); 1479 NavigationEntry* entry = tab->GetActiveEntry();
1479 *success = true; 1480 *success = true;
1480 *security_style = entry->ssl().security_style(); 1481 *security_style = entry->ssl().security_style();
1481 *ssl_cert_status = entry->ssl().cert_status(); 1482 *ssl_cert_status = entry->ssl().cert_status();
1482 *insecure_content_status = entry->ssl().content_status(); 1483 *insecure_content_status = entry->ssl().content_status();
1483 } else { 1484 } else {
1484 *success = false; 1485 *success = false;
1485 *security_style = SECURITY_STYLE_UNKNOWN; 1486 *security_style = SECURITY_STYLE_UNKNOWN;
1486 *ssl_cert_status = 0; 1487 *ssl_cert_status = net::CERT_STATUS_NO_ERROR;
1487 *insecure_content_status = 0; 1488 *insecure_content_status = 0;
1488 } 1489 }
1489 } 1490 }
1490 1491
1491 void TestingAutomationProvider::GetPageType( 1492 void TestingAutomationProvider::GetPageType(
1492 int handle, 1493 int handle,
1493 bool* success, 1494 bool* success,
1494 PageType* page_type) { 1495 PageType* page_type) {
1495 if (tab_tracker_->ContainsHandle(handle)) { 1496 if (tab_tracker_->ContainsHandle(handle)) {
1496 NavigationController* tab = tab_tracker_->GetResource(handle); 1497 NavigationController* tab = tab_tracker_->GetResource(handle);
(...skipping 4835 matching lines...) Expand 10 before | Expand all | Expand 10 after
6332 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 6333 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
6333 6334
6334 Send(reply_message_); 6335 Send(reply_message_);
6335 redirect_query_ = 0; 6336 redirect_query_ = 0;
6336 reply_message_ = NULL; 6337 reply_message_ = NULL;
6337 } 6338 }
6338 6339
6339 void TestingAutomationProvider::OnRemoveProvider() { 6340 void TestingAutomationProvider::OnRemoveProvider() {
6340 AutomationProviderList::GetInstance()->RemoveProvider(this); 6341 AutomationProviderList::GetInstance()->RemoveProvider(this);
6341 } 6342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698