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

Side by Side Diff: chrome/browser/geolocation/chrome_access_token_store.cc

Issue 2845113002: Remove raw base::DictionaryValue::SetWithoutPathExpansion in //chrome (Closed)
Patch Set: Address comments Created 3 years, 7 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/geolocation/chrome_access_token_store.h" 5 #include "chrome/browser/geolocation/chrome_access_token_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 ChromeAccessTokenStore::~ChromeAccessTokenStore() {} 112 ChromeAccessTokenStore::~ChromeAccessTokenStore() {}
113 113
114 static void SetAccessTokenOnUIThread(const GURL& server_url, 114 static void SetAccessTokenOnUIThread(const GURL& server_url,
115 const base::string16& token) { 115 const base::string16& token) {
116 DCHECK_CURRENTLY_ON(BrowserThread::UI); 116 DCHECK_CURRENTLY_ON(BrowserThread::UI);
117 DictionaryPrefUpdate update(g_browser_process->local_state(), 117 DictionaryPrefUpdate update(g_browser_process->local_state(),
118 prefs::kGeolocationAccessToken); 118 prefs::kGeolocationAccessToken);
119 base::DictionaryValue* access_token_dictionary = update.Get(); 119 base::DictionaryValue* access_token_dictionary = update.Get();
120 access_token_dictionary->SetWithoutPathExpansion(server_url.spec(), 120 access_token_dictionary->SetStringWithoutPathExpansion(server_url.spec(),
121 new base::Value(token)); 121 token);
122 } 122 }
123 123
124 void ChromeAccessTokenStore::SaveAccessToken( 124 void ChromeAccessTokenStore::SaveAccessToken(
125 const GURL& server_url, 125 const GURL& server_url,
126 const base::string16& access_token) { 126 const base::string16& access_token) {
127 BrowserThread::PostTask( 127 BrowserThread::PostTask(
128 BrowserThread::UI, FROM_HERE, 128 BrowserThread::UI, FROM_HERE,
129 base::BindOnce(&SetAccessTokenOnUIThread, server_url, access_token)); 129 base::BindOnce(&SetAccessTokenOnUIThread, server_url, access_token));
130 } 130 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/drive/drive_app_mapping.cc ('k') | chrome/browser/profiles/profile_info_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698