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

Side by Side Diff: chrome/browser/policy/url_blacklist_manager_unittest.cc

Issue 124393003: Break dependency of chrome.gyp:common on content.gyp:content_browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix header macro Created 6 years, 11 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
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/prefs/browser_prefs.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 "components/policy/core/common/url_blacklist_manager.h" 5 #include "components/policy/core/browser/url_blacklist_manager.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/message_loop/message_loop_proxy.h"
12 #include "base/prefs/pref_registry_simple.h" 12 #include "base/prefs/pref_registry_simple.h"
13 #include "base/prefs/testing_pref_service.h" 13 #include "base/prefs/testing_pref_service.h"
14 #include "chrome/browser/policy/policy_helpers.h" 14 #include "chrome/browser/policy/policy_helpers.h"
15 #include "chrome/common/net/url_fixer_upper.h" 15 #include "chrome/common/net/url_fixer_upper.h"
16 #include "components/policy/core/common/policy_pref_names.h" 16 #include "components/policy/core/common/policy_pref_names.h"
17 #include "google_apis/gaia/gaia_urls.h" 17 #include "google_apis/gaia/gaia_urls.h"
18 #include "net/base/request_priority.h" 18 #include "net/base/request_priority.h"
19 #include "net/url_request/url_request.h" 19 #include "net/url_request/url_request.h"
20 #include "net/url_request/url_request_test_util.h" 20 #include "net/url_request/url_request_test_util.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 // TODO(joaodasilva): this file should be moved next to 24 // TODO(joaodasilva): this file should be moved next to
25 // components/policy/core/common/url_blacklist_manager.(cc|h). 25 // components/policy/core/browser/url_blacklist_manager.(cc|h).
26 // However, url_fixer_upper.h can't be included from the component. Rather 26 // However, url_fixer_upper.h can't be included from the component. Rather
27 // than having it mocked out, the actual URLFixerUpper::SegmentURL call is used 27 // than having it mocked out, the actual URLFixerUpper::SegmentURL call is used
28 // to make sure that the parsing of URL filters is correct. 28 // to make sure that the parsing of URL filters is correct.
29 29
30 namespace policy { 30 namespace policy {
31 31
32 namespace { 32 namespace {
33 33
34 // Helper to get the disambiguated SegmentURL() function. 34 // Helper to get the disambiguated SegmentURL() function.
35 URLBlacklist::SegmentURLCallback GetSegmentURLCallback() { 35 URLBlacklist::SegmentURLCallback GetSegmentURLCallback() {
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 GURL sync_url(GaiaUrls::GetInstance()->service_login_url().Resolve( 520 GURL sync_url(GaiaUrls::GetInstance()->service_login_url().Resolve(
521 "?service=chromiumsync")); 521 "?service=chromiumsync"));
522 net::URLRequest sync_request(sync_url, net::DEFAULT_PRIORITY, NULL, &context); 522 net::URLRequest sync_request(sync_url, net::DEFAULT_PRIORITY, NULL, &context);
523 sync_request.SetLoadFlags(net::LOAD_MAIN_FRAME); 523 sync_request.SetLoadFlags(net::LOAD_MAIN_FRAME);
524 EXPECT_EQ(block_signin_urls, 524 EXPECT_EQ(block_signin_urls,
525 blacklist_manager_->IsRequestBlocked(sync_request)); 525 blacklist_manager_->IsRequestBlocked(sync_request));
526 } 526 }
527 527
528 } // namespace policy 528 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698