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

Side by Side Diff: chrome/browser/net/chrome_network_delegate_unittest.cc

Issue 660873002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/net/evicted_domain_cookie_counter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_member.h" 10 #include "base/prefs/pref_member.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ChromeNetworkDelegate::InitializePrefsOnUIThread( 107 ChromeNetworkDelegate::InitializePrefsOnUIThread(
108 &enable_referrers_, NULL, &force_google_safe_search_, 108 &enable_referrers_, NULL, &force_google_safe_search_,
109 profile_.GetTestingPrefService()); 109 profile_.GetTestingPrefService());
110 } 110 }
111 111
112 protected: 112 protected:
113 scoped_ptr<net::NetworkDelegate> CreateNetworkDelegate() { 113 scoped_ptr<net::NetworkDelegate> CreateNetworkDelegate() {
114 scoped_ptr<ChromeNetworkDelegate> network_delegate( 114 scoped_ptr<ChromeNetworkDelegate> network_delegate(
115 new ChromeNetworkDelegate(forwarder(), &enable_referrers_)); 115 new ChromeNetworkDelegate(forwarder(), &enable_referrers_));
116 network_delegate->set_force_google_safe_search(&force_google_safe_search_); 116 network_delegate->set_force_google_safe_search(&force_google_safe_search_);
117 return network_delegate.PassAs<net::NetworkDelegate>(); 117 return network_delegate.Pass();
118 } 118 }
119 119
120 void SetSafeSearch(bool value) { 120 void SetSafeSearch(bool value) {
121 force_google_safe_search_.SetValue(value); 121 force_google_safe_search_.SetValue(value);
122 } 122 }
123 123
124 void SetDelegate(net::NetworkDelegate* delegate) { 124 void SetDelegate(net::NetworkDelegate* delegate) {
125 network_delegate_ = delegate; 125 network_delegate_ = delegate;
126 context_.set_network_delegate(network_delegate_); 126 context_.set_network_delegate(network_delegate_);
127 } 127 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 cookie_settings_->SetCookieSetting( 408 cookie_settings_->SetCookieSetting(
409 ContentSettingsPattern::FromURL(kBlockedFirstPartySite), 409 ContentSettingsPattern::FromURL(kBlockedFirstPartySite),
410 ContentSettingsPattern::Wildcard(), 410 ContentSettingsPattern::Wildcard(),
411 CONTENT_SETTING_BLOCK); 411 CONTENT_SETTING_BLOCK);
412 // Privacy mode is disabled as kAllowedSite is still getting cookies 412 // Privacy mode is disabled as kAllowedSite is still getting cookies
413 EXPECT_FALSE(network_delegate_->CanEnablePrivacyMode(kAllowedSite, 413 EXPECT_FALSE(network_delegate_->CanEnablePrivacyMode(kAllowedSite,
414 kBlockedFirstPartySite)); 414 kBlockedFirstPartySite));
415 } 415 }
416 416
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/evicted_domain_cookie_counter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698