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

Side by Side Diff: net/proxy/network_delegate_error_observer_unittest.cc

Issue 10068021: Fix file access on Chrome for ChromeOS on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix net unittests Created 8 years, 7 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 | « net/base/network_delegate.cc ('k') | net/proxy/proxy_script_fetcher_impl_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 "net/proxy/network_delegate_error_observer.h" 5 #include "net/proxy/network_delegate_error_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const string16& error) OVERRIDE { 56 const string16& error) OVERRIDE {
57 got_pac_error_ = true; 57 got_pac_error_ = true;
58 } 58 }
59 virtual AuthRequiredResponse OnAuthRequired( 59 virtual AuthRequiredResponse OnAuthRequired(
60 URLRequest* request, 60 URLRequest* request,
61 const AuthChallengeInfo& auth_info, 61 const AuthChallengeInfo& auth_info,
62 const AuthCallback& callback, 62 const AuthCallback& callback,
63 AuthCredentials* credentials) OVERRIDE { 63 AuthCredentials* credentials) OVERRIDE {
64 return AUTH_REQUIRED_RESPONSE_NO_ACTION; 64 return AUTH_REQUIRED_RESPONSE_NO_ACTION;
65 } 65 }
66 virtual bool CanGetCookies( 66 virtual bool OnCanGetCookies(const URLRequest& request,
67 const URLRequest* request, 67 const CookieList& cookie_list) OVERRIDE {
68 const CookieList& cookie_list) OVERRIDE {
69 return true; 68 return true;
70 } 69 }
71 virtual bool CanSetCookie( 70 virtual bool OnCanSetCookie(const URLRequest& request,
72 const URLRequest* request, 71 const std::string& cookie_line,
73 const std::string& cookie_line, 72 CookieOptions* options) OVERRIDE {
74 CookieOptions* options) OVERRIDE { 73 return true;
74 }
75 virtual bool OnCanAccessFile(const net::URLRequest& request,
76 const FilePath& path) const OVERRIDE {
75 return true; 77 return true;
76 } 78 }
77 79
78 bool got_pac_error_; 80 bool got_pac_error_;
79 }; 81 };
80 82
81 } // namespace 83 } // namespace
82 84
83 // Check that the OnPACScriptError method can be called from an arbitrary 85 // Check that the OnPACScriptError method can be called from an arbitrary
84 // thread. 86 // thread.
(...skipping 22 matching lines...) Expand all
107 thread.message_loop()->PostTask( 109 thread.message_loop()->PostTask(
108 FROM_HERE, 110 FROM_HERE,
109 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError, 111 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
110 base::Unretained(&observer), 42, string16())); 112 base::Unretained(&observer), 42, string16()));
111 thread.Stop(); 113 thread.Stop();
112 MessageLoop::current()->RunAllPending(); 114 MessageLoop::current()->RunAllPending();
113 // Shouldn't have crashed until here... 115 // Shouldn't have crashed until here...
114 } 116 }
115 117
116 } // namespace net 118 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_delegate.cc ('k') | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698