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

Side by Side Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 2819072: Fixed extension sync-related crash in ChromeUrlRequestContext (Closed)
Patch Set: Addressed erikkay's comments Created 10 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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) 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_url_request_context.h" 5 #include "chrome/browser/net/chrome_url_request_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 ExtensionInfo* info) { 834 ExtensionInfo* info) {
835 if (!is_off_the_record_) 835 if (!is_off_the_record_)
836 extension_info_[id] = linked_ptr<ExtensionInfo>(info); 836 extension_info_[id] = linked_ptr<ExtensionInfo>(info);
837 } 837 }
838 838
839 void ChromeURLRequestContext::OnUnloadedExtension(const std::string& id) { 839 void ChromeURLRequestContext::OnUnloadedExtension(const std::string& id) {
840 CheckCurrentlyOnIOThread(); 840 CheckCurrentlyOnIOThread();
841 if (is_off_the_record_) 841 if (is_off_the_record_)
842 return; 842 return;
843 ExtensionInfoMap::iterator iter = extension_info_.find(id); 843 ExtensionInfoMap::iterator iter = extension_info_.find(id);
844 DCHECK(iter != extension_info_.end()); 844 if (iter != extension_info_.end()) {
845 extension_info_.erase(iter); 845 extension_info_.erase(iter);
846 } else {
847 // NOTE: This can currently happen if we receive multiple unload
848 // notifications, e.g. setting incognito-enabled state for a
849 // disabled extension (e.g., via sync). See
850 // http://code.google.com/p/chromium/issues/detail?id=50582 .
851 NOTREACHED() << id;
852 }
846 } 853 }
847 854
848 bool ChromeURLRequestContext::AreCookiesEnabled() const { 855 bool ChromeURLRequestContext::AreCookiesEnabled() const {
849 ContentSetting setting = 856 ContentSetting setting =
850 host_content_settings_map_->GetDefaultContentSetting( 857 host_content_settings_map_->GetDefaultContentSetting(
851 CONTENT_SETTINGS_TYPE_COOKIES); 858 CONTENT_SETTINGS_TYPE_COOKIES);
852 return setting != CONTENT_SETTING_BLOCK; 859 return setting != CONTENT_SETTING_BLOCK;
853 } 860 }
854 861
855 ChromeURLRequestContext::ChromeURLRequestContext( 862 ChromeURLRequestContext::ChromeURLRequestContext(
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 prefs::kProxyAutoDetect)); 1047 prefs::kProxyAutoDetect));
1041 1048
1042 if (pref_service->HasPrefPath(prefs::kProxyBypassList)) { 1049 if (pref_service->HasPrefPath(prefs::kProxyBypassList)) {
1043 std::string proxy_bypass = 1050 std::string proxy_bypass =
1044 pref_service->GetString(prefs::kProxyBypassList); 1051 pref_service->GetString(prefs::kProxyBypassList);
1045 proxy_config->proxy_rules().bypass_rules.ParseFromString(proxy_bypass); 1052 proxy_config->proxy_rules().bypass_rules.ParseFromString(proxy_bypass);
1046 } 1053 }
1047 1054
1048 return proxy_config; 1055 return proxy_config;
1049 } 1056 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698