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

Side by Side Diff: chrome/browser/extensions/api/gcm/gcm_api.cc

Issue 290013011: Move all remaining files to gcm_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_gcm_app_handler.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/api/gcm/gcm_api.h" 5 #include "chrome/browser/extensions/api/gcm/gcm_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/services/gcm/gcm_driver.h"
17 #include "chrome/browser/services/gcm/gcm_profile_service.h" 16 #include "chrome/browser/services/gcm/gcm_profile_service.h"
18 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 17 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
19 #include "chrome/common/extensions/api/gcm.h" 18 #include "chrome/common/extensions/api/gcm.h"
19 #include "components/gcm_driver/gcm_driver.h"
20 #include "extensions/browser/event_router.h" 20 #include "extensions/browser/event_router.h"
21 #include "extensions/common/extension.h" 21 #include "extensions/common/extension.h"
22 22
23 namespace { 23 namespace {
24 24
25 const size_t kMaximumMessageSize = 4096; // in bytes. 25 const size_t kMaximumMessageSize = 4096; // in bytes.
26 const char kCollapseKey[] = "collapse_key"; 26 const char kCollapseKey[] = "collapse_key";
27 const char kGoogDotRestrictedPrefix[] = "goog."; 27 const char kGoogDotRestrictedPrefix[] = "goog.";
28 const char kGoogleRestrictedPrefix[] = "google"; 28 const char kGoogleRestrictedPrefix[] = "google";
29 29
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 error.details.additional_properties = send_error_details.additional_data; 241 error.details.additional_properties = send_error_details.additional_data;
242 242
243 scoped_ptr<Event> event(new Event( 243 scoped_ptr<Event> event(new Event(
244 api::gcm::OnSendError::kEventName, 244 api::gcm::OnSendError::kEventName,
245 api::gcm::OnSendError::Create(error).Pass(), 245 api::gcm::OnSendError::Create(error).Pass(),
246 profile_)); 246 profile_));
247 EventRouter::Get(profile_)->DispatchEventToExtension(app_id, event.Pass()); 247 EventRouter::Get(profile_)->DispatchEventToExtension(app_id, event.Pass());
248 } 248 }
249 249
250 } // namespace extensions 250 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_gcm_app_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698