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

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

Issue 9860044: Coverity: check null returns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 8 years, 8 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 | « no previous file | chrome/browser/ui/webui/net_internals/net_internals_ui.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 "chrome/browser/policy/configuration_policy_handler.h" 5 #include "chrome/browser/policy/configuration_policy_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 switch (proxy_mode) { 735 switch (proxy_mode) {
736 case ProxyPrefs::MODE_DIRECT: 736 case ProxyPrefs::MODE_DIRECT:
737 prefs->SetValue(prefs::kProxy, ProxyConfigDictionary::CreateDirect()); 737 prefs->SetValue(prefs::kProxy, ProxyConfigDictionary::CreateDirect());
738 break; 738 break;
739 case ProxyPrefs::MODE_AUTO_DETECT: 739 case ProxyPrefs::MODE_AUTO_DETECT:
740 prefs->SetValue(prefs::kProxy, ProxyConfigDictionary::CreateAutoDetect()); 740 prefs->SetValue(prefs::kProxy, ProxyConfigDictionary::CreateAutoDetect());
741 break; 741 break;
742 case ProxyPrefs::MODE_PAC_SCRIPT: { 742 case ProxyPrefs::MODE_PAC_SCRIPT: {
743 std::string pac_url_string; 743 std::string pac_url_string;
744 if (pac_url->GetAsString(&pac_url_string)) { 744 if (pac_url && pac_url->GetAsString(&pac_url_string)) {
745 prefs->SetValue(prefs::kProxy, 745 prefs->SetValue(prefs::kProxy,
746 ProxyConfigDictionary::CreatePacScript(pac_url_string, false)); 746 ProxyConfigDictionary::CreatePacScript(pac_url_string, false));
747 } else { 747 } else {
748 NOTREACHED(); 748 NOTREACHED();
749 } 749 }
750 break; 750 break;
751 } 751 }
752 case ProxyPrefs::MODE_FIXED_SERVERS: { 752 case ProxyPrefs::MODE_FIXED_SERVERS: {
753 std::string proxy_server; 753 std::string proxy_server;
754 std::string bypass_list_string; 754 std::string bypass_list_string;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 errors->AddError(key::kClearSiteDataOnExit, 998 errors->AddError(key::kClearSiteDataOnExit,
999 IDS_POLICY_OVERRIDDEN, 999 IDS_POLICY_OVERRIDDEN,
1000 key::kRestoreOnStartup); 1000 key::kRestoreOnStartup);
1001 } 1001 }
1002 } 1002 }
1003 } 1003 }
1004 return true; 1004 return true;
1005 } 1005 }
1006 1006
1007 } // namespace policy 1007 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698