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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry.cc

Issue 10837044: Correct const accessors in base/values.(h|cc), Part II (ListValue) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: David's comments Created 8 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
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/custom_handlers/protocol_handler_registry.h" 5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
828 std::vector<const DictionaryValue*> result; 828 std::vector<const DictionaryValue*> result;
829 PrefService* prefs = profile_->GetPrefs(); 829 PrefService* prefs = profile_->GetPrefs();
830 if (!prefs->HasPrefPath(pref_name)) { 830 if (!prefs->HasPrefPath(pref_name)) {
831 return result; 831 return result;
832 } 832 }
833 833
834 const ListValue* handlers = prefs->GetList(pref_name); 834 const ListValue* handlers = prefs->GetList(pref_name);
835 if (handlers) { 835 if (handlers) {
836 for (size_t i = 0; i < handlers->GetSize(); ++i) { 836 for (size_t i = 0; i < handlers->GetSize(); ++i) {
837 DictionaryValue* dict; 837 const DictionaryValue* dict;
838 if (!handlers->GetDictionary(i, &dict)) 838 if (!handlers->GetDictionary(i, &dict))
839 continue; 839 continue;
840 if (ProtocolHandler::IsValidDict(dict)) { 840 if (ProtocolHandler::IsValidDict(dict)) {
841 result.push_back(dict); 841 result.push_back(dict);
842 } 842 }
843 } 843 }
844 } 844 }
845 return result; 845 return result;
846 } 846 }
847 847
(...skipping 11 matching lines...) Expand all
859 } 859 }
860 860
861 net::URLRequestJobFactory::Interceptor* 861 net::URLRequestJobFactory::Interceptor*
862 ProtocolHandlerRegistry::CreateURLInterceptor() { 862 ProtocolHandlerRegistry::CreateURLInterceptor() {
863 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 863 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
864 // this is always created on the UI thread (in profile_io's 864 // this is always created on the UI thread (in profile_io's
865 // InitializeOnUIThread. Any method calls must be done 865 // InitializeOnUIThread. Any method calls must be done
866 // on the IO thread (this is checked). 866 // on the IO thread (this is checked).
867 return new URLInterceptor(core_); 867 return new URLInterceptor(core_);
868 } 868 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_contacts_service.cc ('k') | chrome/browser/extensions/api/alarms/alarm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698