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

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

Issue 3023037: Remove Value/StringValue's ...UTF16() methods in favour of overloading. (Closed)
Patch Set: I'm an idiot. 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 | « chrome/browser/dom_ui/history_ui.cc ('k') | chrome/browser/plugin_updater.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) 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/geolocation/access_token_store.h" 5 #include "chrome/browser/geolocation/access_token_store.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 request)); 64 request));
65 } 65 }
66 66
67 void SetAccessTokenOnUIThread(const GURL& server_url, const string16& token) { 67 void SetAccessTokenOnUIThread(const GURL& server_url, const string16& token) {
68 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); 68 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
69 DictionaryValue* access_token_dictionary = 69 DictionaryValue* access_token_dictionary =
70 g_browser_process->local_state()->GetMutableDictionary( 70 g_browser_process->local_state()->GetMutableDictionary(
71 prefs::kGeolocationAccessToken); 71 prefs::kGeolocationAccessToken);
72 access_token_dictionary->SetWithoutPathExpansion( 72 access_token_dictionary->SetWithoutPathExpansion(
73 UTF8ToWide(server_url.spec()), 73 UTF8ToWide(server_url.spec()),
74 Value::CreateStringValueFromUTF16(token)); 74 Value::CreateStringValue(token));
75 } 75 }
76 76
77 void ChromePrefsAccessTokenStore::SaveAccessToken( 77 void ChromePrefsAccessTokenStore::SaveAccessToken(
78 const GURL& server_url, const string16& access_token) { 78 const GURL& server_url, const string16& access_token) {
79 ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, NewRunnableFunction( 79 ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, NewRunnableFunction(
80 &SetAccessTokenOnUIThread, server_url, access_token)); 80 &SetAccessTokenOnUIThread, server_url, access_token));
81 } 81 }
82 } // namespace 82 } // namespace
83 83
84 AccessTokenStore::AccessTokenStore() { 84 AccessTokenStore::AccessTokenStore() {
(...skipping 15 matching lines...) Expand all
100 DCHECK(request->handle()); 100 DCHECK(request->handle());
101 101
102 DoLoadAccessTokens(request); 102 DoLoadAccessTokens(request);
103 return request->handle(); 103 return request->handle();
104 } 104 }
105 105
106 // Creates a new access token store backed by the global chome prefs. 106 // Creates a new access token store backed by the global chome prefs.
107 AccessTokenStore* NewChromePrefsAccessTokenStore() { 107 AccessTokenStore* NewChromePrefsAccessTokenStore() {
108 return new ChromePrefsAccessTokenStore; 108 return new ChromePrefsAccessTokenStore;
109 } 109 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/history_ui.cc ('k') | chrome/browser/plugin_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698