| OLD | NEW |
| 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/extensions/app_notify_channel_setup.h" | 5 #include "chrome/browser/extensions/app_notify_channel_setup.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 AppNotifyChannelSetup::AppNotifyChannelSetup( | 71 AppNotifyChannelSetup::AppNotifyChannelSetup( |
| 72 Profile* profile, | 72 Profile* profile, |
| 73 const std::string& extension_id, | 73 const std::string& extension_id, |
| 74 const std::string& client_id, | 74 const std::string& client_id, |
| 75 const GURL& requestor_url, | 75 const GURL& requestor_url, |
| 76 int return_route_id, | 76 int return_route_id, |
| 77 int callback_id, | 77 int callback_id, |
| 78 AppNotifyChannelUI* ui, | 78 AppNotifyChannelUI* ui, |
| 79 base::WeakPtr<AppNotifyChannelSetup::Delegate> delegate) | 79 base::WeakPtr<AppNotifyChannelSetup::Delegate> delegate) |
| 80 : profile_(profile), | 80 : profile_(profile->GetOriginalProfile()), |
| 81 extension_id_(extension_id), | 81 extension_id_(extension_id), |
| 82 client_id_(client_id), | 82 client_id_(client_id), |
| 83 requestor_url_(requestor_url), | 83 requestor_url_(requestor_url), |
| 84 return_route_id_(return_route_id), | 84 return_route_id_(return_route_id), |
| 85 callback_id_(callback_id), | 85 callback_id_(callback_id), |
| 86 delegate_(delegate), | 86 delegate_(delegate), |
| 87 ui_(ui), | 87 ui_(ui), |
| 88 state_(INITIAL), | 88 state_(INITIAL), |
| 89 oauth2_access_token_failure_(false) {} | 89 oauth2_access_token_failure_(false) {} |
| 90 | 90 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 DictionaryValue* dict = static_cast<DictionaryValue*>(value.get()); | 401 DictionaryValue* dict = static_cast<DictionaryValue*>(value.get()); |
| 402 if (!dict->Get("id", &channel_id_value)) | 402 if (!dict->Get("id", &channel_id_value)) |
| 403 return false; | 403 return false; |
| 404 if (channel_id_value->GetType() != base::Value::TYPE_STRING) | 404 if (channel_id_value->GetType() != base::Value::TYPE_STRING) |
| 405 return false; | 405 return false; |
| 406 | 406 |
| 407 StringValue* channel_id = static_cast<StringValue*>(channel_id_value); | 407 StringValue* channel_id = static_cast<StringValue*>(channel_id_value); |
| 408 channel_id->GetAsString(result); | 408 channel_id->GetAsString(result); |
| 409 return true; | 409 return true; |
| 410 } | 410 } |
| OLD | NEW |