title: Callback returns undefined with chrome.storage.sync.get
body: <p>I'm building a Chrome extension and I wrote this code.</p>
  
  <pre><code>var Options = function(){};
  
  Options.prototype = {
  
      getMode: function(){
                 return chrome.storage.sync.get("value", function(e){  
                   console.log(e); // it prints 'Object {value: "test"}'.       
                   return e;
                 });
      },
  
      setMode: function(){
          chrome.storage.sync.set({"value": "test"}, function(e) {         
          })
      }
  }
  
  var options = new Options();
  options.setMode();
  console.log(options.getMode()); // it prints 'undefined'.
  </code></pre>
  
  <p>I expected it to print </p>
  
  <pre><code>Object {value: "set up"}
  </code></pre>
  
  <p>when I call <code>options.getMode()</code>, but it prints <code>undefined</code>.</p>
  
  <p>Does anyone know how to fix this problem?</p>