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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1252
1253 if (filter.get()) { 1253 if (filter.get()) {
1254 // Try to automatically select a client certificate. 1254 // Try to automatically select a client certificate.
1255 if (filter->IsType(Value::TYPE_DICTIONARY)) { 1255 if (filter->IsType(Value::TYPE_DICTIONARY)) {
1256 DictionaryValue* filter_dict = 1256 DictionaryValue* filter_dict =
1257 static_cast<DictionaryValue*>(filter.get()); 1257 static_cast<DictionaryValue*>(filter.get());
1258 1258
1259 const std::vector<scoped_refptr<net::X509Certificate> >& 1259 const std::vector<scoped_refptr<net::X509Certificate> >&
1260 all_client_certs = cert_request_info->client_certs; 1260 all_client_certs = cert_request_info->client_certs;
1261 for (size_t i = 0; i < all_client_certs.size(); ++i) { 1261 for (size_t i = 0; i < all_client_certs.size(); ++i) {
1262 if (CertMatchesFilter(*all_client_certs[i], *filter_dict)) { 1262 if (CertMatchesFilter(*all_client_certs[i].get(), *filter_dict)) {
1263 // Use the first certificate that is matched by the filter. 1263 // Use the first certificate that is matched by the filter.
1264 callback.Run(all_client_certs[i]); 1264 callback.Run(all_client_certs[i].get());
1265 return; 1265 return;
1266 } 1266 }
1267 } 1267 }
1268 } else { 1268 } else {
1269 NOTREACHED(); 1269 NOTREACHED();
1270 } 1270 }
1271 } 1271 }
1272 1272
1273 SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); 1273 SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab);
1274 if (!ssl_tab_helper) { 1274 if (!ssl_tab_helper) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 #if defined(OS_ANDROID) 1556 #if defined(OS_ANDROID)
1557 web_prefs->font_scale_factor = 1557 web_prefs->font_scale_factor =
1558 static_cast<float>(prefs->GetDouble(prefs::kWebKitFontScaleFactor)); 1558 static_cast<float>(prefs->GetDouble(prefs::kWebKitFontScaleFactor));
1559 web_prefs->force_enable_zoom = 1559 web_prefs->force_enable_zoom =
1560 prefs->GetBoolean(prefs::kWebKitForceEnableZoom); 1560 prefs->GetBoolean(prefs::kWebKitForceEnableZoom);
1561 #endif 1561 #endif
1562 web_prefs->password_echo_enabled = browser_defaults::kPasswordEchoEnabled; 1562 web_prefs->password_echo_enabled = browser_defaults::kPasswordEchoEnabled;
1563 1563
1564 // The user stylesheet watcher may not exist in a testing profile. 1564 // The user stylesheet watcher may not exist in a testing profile.
1565 UserStyleSheetWatcher* user_style_sheet_watcher = 1565 UserStyleSheetWatcher* user_style_sheet_watcher =
1566 UserStyleSheetWatcherFactory::GetForProfile(profile); 1566 UserStyleSheetWatcherFactory::GetForProfile(profile).get();
1567 if (user_style_sheet_watcher) { 1567 if (user_style_sheet_watcher) {
1568 web_prefs->user_style_sheet_enabled = true; 1568 web_prefs->user_style_sheet_enabled = true;
1569 web_prefs->user_style_sheet_location = 1569 web_prefs->user_style_sheet_location =
1570 user_style_sheet_watcher->user_style_sheet(); 1570 user_style_sheet_watcher->user_style_sheet();
1571 } else { 1571 } else {
1572 web_prefs->user_style_sheet_enabled = false; 1572 web_prefs->user_style_sheet_enabled = false;
1573 } 1573 }
1574 1574
1575 web_prefs->asynchronous_spell_checking_enabled = 1575 web_prefs->asynchronous_spell_checking_enabled =
1576 #if defined(OS_MACOSX) 1576 #if defined(OS_MACOSX)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 partition_id = extension->id(); 1878 partition_id = extension->id();
1879 } 1879 }
1880 1880
1881 // Enforce that IsValidStoragePartitionId() implementation stays in sync. 1881 // Enforce that IsValidStoragePartitionId() implementation stays in sync.
1882 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); 1882 DCHECK(IsValidStoragePartitionId(browser_context, partition_id));
1883 return partition_id; 1883 return partition_id;
1884 } 1884 }
1885 1885
1886 1886
1887 } // namespace chrome 1887 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/mock_browsing_data_quota_helper.cc ('k') | chrome/browser/chrome_plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698