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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc

Issue 10108026: Transmit a X-Chrome-UMA-Enabled bit to Google domains from clients that have UMA enabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incognito field naming Created 8 years, 8 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
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 <queue> 5 #include <queue>
6 #include <map> 6 #include <map>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 : ui_thread_(content::BrowserThread::UI, &message_loop_), 119 : ui_thread_(content::BrowserThread::UI, &message_loop_),
120 io_thread_(content::BrowserThread::IO, &message_loop_) {} 120 io_thread_(content::BrowserThread::IO, &message_loop_) {}
121 121
122 protected: 122 protected:
123 virtual void SetUp() OVERRIDE { 123 virtual void SetUp() OVERRIDE {
124 event_router_ = new ExtensionEventRouterForwarder(); 124 event_router_ = new ExtensionEventRouterForwarder();
125 enable_referrers_.Init( 125 enable_referrers_.Init(
126 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL); 126 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
127 network_delegate_.reset(new ChromeNetworkDelegate( 127 network_delegate_.reset(new ChromeNetworkDelegate(
128 event_router_.get(), NULL, NULL, &profile_, 128 event_router_.get(), NULL, NULL, &profile_,
129 CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_)); 129 CookieSettings::Factory::GetForProfile(&profile_),
130 ChromeNetworkDelegate::INCOGNITO_OFF,
131 &enable_referrers_, NULL));
130 context_ = new TestURLRequestContext(); 132 context_ = new TestURLRequestContext();
131 context_->set_network_delegate(network_delegate_.get()); 133 context_->set_network_delegate(network_delegate_.get());
132 } 134 }
133 135
134 MessageLoopForIO message_loop_; 136 MessageLoopForIO message_loop_;
135 content::TestBrowserThread ui_thread_; 137 content::TestBrowserThread ui_thread_;
136 content::TestBrowserThread io_thread_; 138 content::TestBrowserThread io_thread_;
137 TestingProfile profile_; 139 TestingProfile profile_;
138 TestDelegate delegate_; 140 TestDelegate delegate_;
139 BooleanPrefMember enable_referrers_; 141 BooleanPrefMember enable_referrers_;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 : ui_thread_(content::BrowserThread::UI, &message_loop_), 438 : ui_thread_(content::BrowserThread::UI, &message_loop_),
437 io_thread_(content::BrowserThread::IO, &message_loop_) {} 439 io_thread_(content::BrowserThread::IO, &message_loop_) {}
438 440
439 protected: 441 protected:
440 virtual void SetUp() { 442 virtual void SetUp() {
441 event_router_ = new ExtensionEventRouterForwarder(); 443 event_router_ = new ExtensionEventRouterForwarder();
442 enable_referrers_.Init( 444 enable_referrers_.Init(
443 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL); 445 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
444 network_delegate_.reset(new ChromeNetworkDelegate( 446 network_delegate_.reset(new ChromeNetworkDelegate(
445 event_router_.get(), NULL, NULL, &profile_, 447 event_router_.get(), NULL, NULL, &profile_,
446 CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_)); 448 CookieSettings::Factory::GetForProfile(&profile_),
449 ChromeNetworkDelegate::INCOGNITO_OFF,
450 &enable_referrers_, NULL));
447 context_ = new TestURLRequestContext(); 451 context_ = new TestURLRequestContext();
448 context_->set_network_delegate(network_delegate_.get()); 452 context_->set_network_delegate(network_delegate_.get());
449 } 453 }
450 454
451 MessageLoopForIO message_loop_; 455 MessageLoopForIO message_loop_;
452 content::TestBrowserThread ui_thread_; 456 content::TestBrowserThread ui_thread_;
453 content::TestBrowserThread io_thread_; 457 content::TestBrowserThread io_thread_;
454 TestingProfile profile_; 458 TestingProfile profile_;
455 TestDelegate delegate_; 459 TestDelegate delegate_;
456 BooleanPrefMember enable_referrers_; 460 BooleanPrefMember enable_referrers_;
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 }; 1504 };
1501 for (size_t i = 0; i < arraysize(sensitive_urls); ++i) { 1505 for (size_t i = 0; i < arraysize(sensitive_urls); ++i) {
1502 EXPECT_TRUE(helpers::HideRequestForURL(GURL(sensitive_urls[i]))) 1506 EXPECT_TRUE(helpers::HideRequestForURL(GURL(sensitive_urls[i])))
1503 << sensitive_urls[i]; 1507 << sensitive_urls[i];
1504 } 1508 }
1505 for (size_t i = 0; i < arraysize(non_sensitive_urls); ++i) { 1509 for (size_t i = 0; i < arraysize(non_sensitive_urls); ++i) {
1506 EXPECT_FALSE(helpers::HideRequestForURL(GURL(non_sensitive_urls[i]))) 1510 EXPECT_FALSE(helpers::HideRequestForURL(GURL(non_sensitive_urls[i])))
1507 << non_sensitive_urls[i]; 1511 << non_sensitive_urls[i];
1508 } 1512 }
1509 } 1513 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google/google_util.h » ('j') | chrome/browser/metrics/metrics_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698