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/net/chrome_cookie_policy.cc

Issue 5367006: Refactor: move HostContentSettingsMap to content_settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/net/chrome_cookie_policy.h" 5 #include "chrome/browser/net/chrome_cookie_policy.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/browser_list.h" 8 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
10 #include "chrome/browser/host_content_settings_map.h" 10 #include "chrome/browser/content_settings/host_content_settings_map.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/base/static_cookie_policy.h" 12 #include "net/base/static_cookie_policy.h"
13 13
14 // If we queue up more than this number of completions, then switch from ASK to 14 // If we queue up more than this number of completions, then switch from ASK to
15 // BLOCK. More than this number of requests at once seems like it could be a 15 // BLOCK. More than this number of requests at once seems like it could be a
16 // sign of trouble anyways. 16 // sign of trouble anyways.
17 static const size_t kMaxCompletionsPerHost = 10000; 17 static const size_t kMaxCompletionsPerHost = 10000;
18 18
19 // ---------------------------------------------------------------------------- 19 // ----------------------------------------------------------------------------
20 20
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 url, CONTENT_SETTINGS_TYPE_COOKIES, ""); 99 url, CONTENT_SETTINGS_TYPE_COOKIES, "");
100 if (setting == CONTENT_SETTING_BLOCK) 100 if (setting == CONTENT_SETTING_BLOCK)
101 return net::ERR_ACCESS_DENIED; 101 return net::ERR_ACCESS_DENIED;
102 if (setting == CONTENT_SETTING_ALLOW) 102 if (setting == CONTENT_SETTING_ALLOW)
103 return net::OK; 103 return net::OK;
104 if (setting == CONTENT_SETTING_SESSION_ONLY) 104 if (setting == CONTENT_SETTING_SESSION_ONLY)
105 return net::OK_FOR_SESSION_ONLY; 105 return net::OK_FOR_SESSION_ONLY;
106 return net::ERR_IO_PENDING; // Need to prompt. 106 return net::ERR_IO_PENDING; // Need to prompt.
107 } 107 }
108 108
OLDNEW
« no previous file with comments | « chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc ('k') | chrome/browser/net/chrome_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698