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/safe_browsing/safe_browsing_service_browsertest.cc

Issue 356843002: [Android] Disable connect type check for unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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 // This test creates a safebrowsing service using test safebrowsing database 5 // This test creates a safebrowsing service using test safebrowsing database
6 // and a test protocol manager. It is used to test logics in safebrowsing 6 // and a test protocol manager. It is used to test logics in safebrowsing
7 // service. 7 // service.
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 public: 69 public:
70 explicit FakeSafeBrowsingService(const std::string& url_prefix) 70 explicit FakeSafeBrowsingService(const std::string& url_prefix)
71 : url_prefix_(url_prefix) {} 71 : url_prefix_(url_prefix) {}
72 72
73 virtual SafeBrowsingProtocolConfig GetProtocolConfig() const OVERRIDE { 73 virtual SafeBrowsingProtocolConfig GetProtocolConfig() const OVERRIDE {
74 SafeBrowsingProtocolConfig config; 74 SafeBrowsingProtocolConfig config;
75 config.url_prefix = url_prefix_; 75 config.url_prefix = url_prefix_;
76 // Makes sure the auto update is not triggered. The tests will force the 76 // Makes sure the auto update is not triggered. The tests will force the
77 // update when needed. 77 // update when needed.
78 config.disable_auto_update = true; 78 config.disable_auto_update = true;
79 #if defined(OS_ANDROID)
80 config.disable_connection_check = true;
81 #endif
79 config.client_name = "browser_tests"; 82 config.client_name = "browser_tests";
80 return config; 83 return config;
81 } 84 }
82 85
83 private: 86 private:
84 virtual ~FakeSafeBrowsingService() {} 87 virtual ~FakeSafeBrowsingService() {}
85 88
86 std::string url_prefix_; 89 std::string url_prefix_;
87 90
88 DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingService); 91 DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingService);
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 content::WindowedNotificationObserver observer( 997 content::WindowedNotificationObserver observer(
995 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, 998 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE,
996 content::Source<SafeBrowsingDatabaseManager>( 999 content::Source<SafeBrowsingDatabaseManager>(
997 sb_service_->database_manager().get())); 1000 sb_service_->database_manager().get()));
998 BrowserThread::PostTask( 1001 BrowserThread::PostTask(
999 BrowserThread::IO, 1002 BrowserThread::IO,
1000 FROM_HERE, 1003 FROM_HERE,
1001 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); 1004 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this));
1002 observer.Wait(); 1005 observer.Wait();
1003 } 1006 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698