OLD | NEW |
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 // Implements the Chrome Extensions Cookies API. | 5 // Implements the Chrome Extensions Cookies API. |
6 | 6 |
7 #include "chrome/browser/extensions/extension_cookies_api.h" | 7 #include "chrome/browser/extensions/extension_cookies_api.h" |
8 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
| 11 #include "base/values.h" |
11 #include "chrome/browser/browser_list.h" | 12 #include "chrome/browser/browser_list.h" |
12 #include "chrome/browser/chrome_thread.h" | 13 #include "chrome/browser/chrome_thread.h" |
13 #include "chrome/browser/extensions/extension_cookies_api_constants.h" | 14 #include "chrome/browser/extensions/extension_cookies_api_constants.h" |
14 #include "chrome/browser/extensions/extension_cookies_helpers.h" | 15 #include "chrome/browser/extensions/extension_cookies_helpers.h" |
15 #include "chrome/browser/extensions/extension_message_service.h" | 16 #include "chrome/browser/extensions/extension_message_service.h" |
16 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profile.h" |
17 #include "chrome/common/extensions/extension_error_utils.h" | 18 #include "chrome/common/extensions/extension_error_utils.h" |
18 #include "chrome/common/net/url_request_context_getter.h" | 19 #include "chrome/common/net/url_request_context_getter.h" |
19 #include "chrome/common/notification_type.h" | 20 #include "chrome/common/notification_type.h" |
20 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 original_profile, original_tab_ids.release())); | 437 original_profile, original_tab_ids.release())); |
437 } | 438 } |
438 if (incognito_tab_ids.get() && incognito_tab_ids->GetSize() > 0) { | 439 if (incognito_tab_ids.get() && incognito_tab_ids->GetSize() > 0) { |
439 cookie_store_list->Append( | 440 cookie_store_list->Append( |
440 extension_cookies_helpers::CreateCookieStoreValue( | 441 extension_cookies_helpers::CreateCookieStoreValue( |
441 incognito_profile, incognito_tab_ids.release())); | 442 incognito_profile, incognito_tab_ids.release())); |
442 } | 443 } |
443 result_.reset(cookie_store_list); | 444 result_.reset(cookie_store_list); |
444 return true; | 445 return true; |
445 } | 446 } |
OLD | NEW |