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

Side by Side Diff: chrome/browser/extensions/api/proxy/proxy_api.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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
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 // Implementation of the Chrome Extensions Proxy Settings API. 5 // Implementation of the Chrome Extensions Proxy Settings API.
6 6
7 #include "chrome/browser/extensions/api/proxy/proxy_api.h" 7 #include "chrome/browser/extensions/api/proxy/proxy_api.h"
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 void ProxyEventRouter::OnProxyError( 36 void ProxyEventRouter::OnProxyError(
37 EventRouterForwarder* event_router, 37 EventRouterForwarder* event_router,
38 void* profile, 38 void* profile,
39 int error_code) { 39 int error_code) {
40 scoped_ptr<ListValue> args(new ListValue()); 40 scoped_ptr<ListValue> args(new ListValue());
41 DictionaryValue* dict = new DictionaryValue(); 41 DictionaryValue* dict = new DictionaryValue();
42 dict->SetBoolean(keys::kProxyEventFatal, true); 42 dict->SetBoolean(keys::kProxyEventFatal, true);
43 dict->SetString(keys::kProxyEventError, net::ErrorToString(error_code)); 43 dict->SetString(keys::kProxyEventError, net::ErrorToString(error_code));
44 dict->SetString(keys::kProxyEventDetails, ""); 44 dict->SetString(keys::kProxyEventDetails, std::string());
45 args->Append(dict); 45 args->Append(dict);
46 46
47 if (profile) { 47 if (profile) {
48 event_router->DispatchEventToRenderers( 48 event_router->DispatchEventToRenderers(
49 keys::kProxyEventOnProxyError, args.Pass(), profile, true, GURL()); 49 keys::kProxyEventOnProxyError, args.Pass(), profile, true, GURL());
50 } else { 50 } else {
51 event_router->BroadcastEventToRenderers( 51 event_router->BroadcastEventToRenderers(
52 keys::kProxyEventOnProxyError, args.Pass(), GURL()); 52 keys::kProxyEventOnProxyError, args.Pass(), GURL());
53 } 53 }
54 } 54 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 extension_pref->Set(keys::kProxyConfigRules, proxy_rules_dict); 173 extension_pref->Set(keys::kProxyConfigRules, proxy_rules_dict);
174 break; 174 break;
175 } 175 }
176 case ProxyPrefs::kModeCount: 176 case ProxyPrefs::kModeCount:
177 NOTREACHED(); 177 NOTREACHED();
178 } 178 }
179 return extension_pref.release(); 179 return extension_pref.release();
180 } 180 }
181 181
182 } // namespace extensions 182 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698