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

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: MAD comment 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_), false,
Ilya Sherman 2012/04/17 20:55:39 nit: Please use an enumerated constant so that me
SteveT 2012/04/19 18:38:01 Done.
130 &enable_referrers_));
130 context_ = new TestURLRequestContext(); 131 context_ = new TestURLRequestContext();
131 context_->set_network_delegate(network_delegate_.get()); 132 context_->set_network_delegate(network_delegate_.get());
132 } 133 }
133 134
134 MessageLoopForIO message_loop_; 135 MessageLoopForIO message_loop_;
135 content::TestBrowserThread ui_thread_; 136 content::TestBrowserThread ui_thread_;
136 content::TestBrowserThread io_thread_; 137 content::TestBrowserThread io_thread_;
137 TestingProfile profile_; 138 TestingProfile profile_;
138 TestDelegate delegate_; 139 TestDelegate delegate_;
139 BooleanPrefMember enable_referrers_; 140 BooleanPrefMember enable_referrers_;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 : ui_thread_(content::BrowserThread::UI, &message_loop_), 437 : ui_thread_(content::BrowserThread::UI, &message_loop_),
437 io_thread_(content::BrowserThread::IO, &message_loop_) {} 438 io_thread_(content::BrowserThread::IO, &message_loop_) {}
438 439
439 protected: 440 protected:
440 virtual void SetUp() { 441 virtual void SetUp() {
441 event_router_ = new ExtensionEventRouterForwarder(); 442 event_router_ = new ExtensionEventRouterForwarder();
442 enable_referrers_.Init( 443 enable_referrers_.Init(
443 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL); 444 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
444 network_delegate_.reset(new ChromeNetworkDelegate( 445 network_delegate_.reset(new ChromeNetworkDelegate(
445 event_router_.get(), NULL, NULL, &profile_, 446 event_router_.get(), NULL, NULL, &profile_,
446 CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_)); 447 CookieSettings::Factory::GetForProfile(&profile_), false,
448 &enable_referrers_));
447 context_ = new TestURLRequestContext(); 449 context_ = new TestURLRequestContext();
448 context_->set_network_delegate(network_delegate_.get()); 450 context_->set_network_delegate(network_delegate_.get());
449 } 451 }
450 452
451 MessageLoopForIO message_loop_; 453 MessageLoopForIO message_loop_;
452 content::TestBrowserThread ui_thread_; 454 content::TestBrowserThread ui_thread_;
453 content::TestBrowserThread io_thread_; 455 content::TestBrowserThread io_thread_;
454 TestingProfile profile_; 456 TestingProfile profile_;
455 TestDelegate delegate_; 457 TestDelegate delegate_;
456 BooleanPrefMember enable_referrers_; 458 BooleanPrefMember enable_referrers_;
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 }; 1502 };
1501 for (size_t i = 0; i < arraysize(sensitive_urls); ++i) { 1503 for (size_t i = 0; i < arraysize(sensitive_urls); ++i) {
1502 EXPECT_TRUE(helpers::HideRequestForURL(GURL(sensitive_urls[i]))) 1504 EXPECT_TRUE(helpers::HideRequestForURL(GURL(sensitive_urls[i])))
1503 << sensitive_urls[i]; 1505 << sensitive_urls[i];
1504 } 1506 }
1505 for (size_t i = 0; i < arraysize(non_sensitive_urls); ++i) { 1507 for (size_t i = 0; i < arraysize(non_sensitive_urls); ++i) {
1506 EXPECT_FALSE(helpers::HideRequestForURL(GURL(non_sensitive_urls[i]))) 1508 EXPECT_FALSE(helpers::HideRequestForURL(GURL(non_sensitive_urls[i])))
1507 << non_sensitive_urls[i]; 1509 << non_sensitive_urls[i];
1508 } 1510 }
1509 } 1511 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google/google_util.h » ('j') | chrome/browser/google/google_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698