]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix compilation error on Linux.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 13 Aug 2014 06:43:21 +0000 (14:43 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 13 Aug 2014 06:43:21 +0000 (14:43 +0800)
atom/browser/atom_access_token_store.cc

index 6555ac76aea122dcd5377cde365d9ff09ecd6389..af0f3c1b27dbb24ff4f663e4f31331f47eae53eb 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "atom/browser/atom_access_token_store.h"
 
+#include <utility>
+
 #include "atom/browser/atom_browser_context.h"
 #include "atom/browser/net/atom_url_request_context_getter.h"
 
@@ -33,7 +35,14 @@ AtomAccessTokenStore::~AtomAccessTokenStore() {
 void AtomAccessTokenStore::LoadAccessTokens(
     const LoadAccessTokensCallbackType& callback) {
   AccessTokenSet access_token_set;
-  access_token_set[GURL(kGeolocationProviderUrl)];
+
+  // Equivelent to access_token_set[kGeolocationProviderUrl].
+  // Somehow base::string16 is causing compilation errors when used in a pair
+  // of std::map on Linux, this can work around it.
+  std::pair<GURL, base::string16> token_pair;
+  token_pair.first = GURL(kGeolocationProviderUrl);
+  access_token_set.insert(token_pair);
+
   callback.Run(access_token_set,
                AtomBrowserContext::Get()->url_request_context_getter());
 }