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

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 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 NavigationController* tab = tab_tracker_->GetResource(tab_handle); 1466 NavigationController* tab = tab_tracker_->GetResource(tab_handle);
1467 restore_tracker_.reset( 1467 restore_tracker_.reset(
1468 new NavigationControllerRestoredObserver(this, tab, reply_message)); 1468 new NavigationControllerRestoredObserver(this, tab, reply_message));
1469 } else { 1469 } else {
1470 AutomationMsg_WaitForTabToBeRestored::WriteReplyParams( 1470 AutomationMsg_WaitForTabToBeRestored::WriteReplyParams(
1471 reply_message, false); 1471 reply_message, false);
1472 Send(reply_message); 1472 Send(reply_message);
1473 } 1473 }
1474 } 1474 }
1475 1475
1476 void TestingAutomationProvider::GetSecurityState(int handle, 1476 void TestingAutomationProvider::GetSecurityState(
1477 bool* success, 1477 int handle,
1478 SecurityStyle* security_style, 1478 bool* success,
1479 int* ssl_cert_status, 1479 SecurityStyle* security_style,
1480 int* insecure_content_status) { 1480 net::CertStatus* ssl_cert_status,
1481 int* insecure_content_status) {
1481 if (tab_tracker_->ContainsHandle(handle)) { 1482 if (tab_tracker_->ContainsHandle(handle)) {
1482 NavigationController* tab = tab_tracker_->GetResource(handle); 1483 NavigationController* tab = tab_tracker_->GetResource(handle);
1483 NavigationEntry* entry = tab->GetActiveEntry(); 1484 NavigationEntry* entry = tab->GetActiveEntry();
1484 *success = true; 1485 *success = true;
1485 *security_style = entry->ssl().security_style(); 1486 *security_style = entry->ssl().security_style();
1486 *ssl_cert_status = entry->ssl().cert_status(); 1487 *ssl_cert_status = entry->ssl().cert_status();
1487 *insecure_content_status = entry->ssl().content_status(); 1488 *insecure_content_status = entry->ssl().content_status();
1488 } else { 1489 } else {
1489 *success = false; 1490 *success = false;
1490 *security_style = SECURITY_STYLE_UNKNOWN; 1491 *security_style = SECURITY_STYLE_UNKNOWN;
1491 *ssl_cert_status = 0; 1492 *ssl_cert_status = net::CERT_STATUS_NO_ERROR;
1492 *insecure_content_status = 0; 1493 *insecure_content_status = 0;
1493 } 1494 }
1494 } 1495 }
1495 1496
1496 void TestingAutomationProvider::GetPageType( 1497 void TestingAutomationProvider::GetPageType(
1497 int handle, 1498 int handle,
1498 bool* success, 1499 bool* success,
1499 PageType* page_type) { 1500 PageType* page_type) {
1500 if (tab_tracker_->ContainsHandle(handle)) { 1501 if (tab_tracker_->ContainsHandle(handle)) {
1501 NavigationController* tab = tab_tracker_->GetResource(handle); 1502 NavigationController* tab = tab_tracker_->GetResource(handle);
(...skipping 4839 matching lines...) Expand 10 before | Expand all | Expand 10 after
6341 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 6342 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
6342 6343
6343 Send(reply_message_); 6344 Send(reply_message_);
6344 redirect_query_ = 0; 6345 redirect_query_ = 0;
6345 reply_message_ = NULL; 6346 reply_message_ = NULL;
6346 } 6347 }
6347 6348
6348 void TestingAutomationProvider::OnRemoveProvider() { 6349 void TestingAutomationProvider::OnRemoveProvider() {
6349 AutomationProviderList::GetInstance()->RemoveProvider(this); 6350 AutomationProviderList::GetInstance()->RemoveProvider(this);
6350 } 6351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698